@import "icons.css";
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  background: white;
  min-height: 100vh;
  font-family: sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6,
h7 {
  padding: 0;
  margin: 0;
}
:root {
  --pixels-per-mm: 12;
}
body {
  --card-width: 
		round(
			up,
			calc( var(--card-width-i, 2.5) * 300 )
		)
		;
  --card-height: 
		round(
			up,
			calc( var(--card-width-i, 3.5) * 300 )
		)
		;
  --card-description-hyphens: none;
  --card-description-text-align: justify;
  --card-bleed: 0;
  --card-outline: calc( var(--card-bleed) * var( --pixels-per-mm ) );
  --page-padding: calc( 1 * var(--pixels-per-mm) );
  --page-width: 8.3;
  --page-height: 11.7;
  --bleed-outer: 0;
  --bleed: 0;
  --page-cards-jc: space-evenly;
  --page-cards-ai: space-evenly;
}
body.card_hyphens {
  --card-description-hyphens: auto;
}
body.card_text_align-left {
  --card-description-text-align: left;
}
body.page_orientation-landscape {
  --page-width: 11.7;
  --page-height: 8.3;
}
body.page_size-a3 {
  --page-width: 11.69;
  --page-height: 16.54;
}
body.page_orientation-landscape.page_size-a3 {
  --page-width: 16.54;
  --page-height: 11.69;
}
body.page_card_align-center {
  --page-cards-jc: center;
  --page-cards-ai: center;
}
input:focus {
  outline: none;
}
.icon::before {
  content: '';
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  display: block;
  height: 100%;
  width: 100%;
}
button {
  margin-top: 20px;
  line-height: 2.5em;
  background: none;
  border: none;
  color: white;
  font-family: inherit;
  text-transform: lowercase;
  font-variant: small-caps;
  font-size: 1.4em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  background: 
		linear-gradient(to right, transparent, white, transparent) center 0 / 100% 2px no-repeat 
		, linear-gradient(to right, transparent, white, transparent) center 100% / 100% 2px no-repeat 
		, linear-gradient(to bottom, white, transparent 50%) 0 0 / 0 0 no-repeat 
		, linear-gradient(to top, white, transparent 50%) 0 100% / 0 0 no-repeat 
		, linear-gradient(to bottom, white, transparent 50%) 100% 0 / 0 0 no-repeat 
		, linear-gradient(to top, white, transparent 50%) 100% 100% / 0 0 no-repeat 
	;
  background-color: black;
}
button:hover {
  background-size: 500% 2px
			, 500% 2px
			, 2px 100%
			, 2px 100%
			, 2px 100%
			, 2px 100%
		;
}
button:hover::before,
button:hover::after {
  opacity: 100%;
}
button::before,
button::after {
  content: '';
  background: url('/assets/grimoire/images/button.png');
  width: 30px;
  height: 30px;
  background-size: 100% 100%;
  opacity: 0;
  transition: 300ms;
}
button::after {
  transform: rotate(180deg);
}
.aicon {
  filter: invert(100%) drop-shadow(0 0 10px black) drop-shadow(0 0 20px white) drop-shadow(0 0 30px white);
  transition: 300ms;
  fill: transparent;
}
.aicon path {
  transform-origin: center center;
  fill: white;
  stroke: white;
  transition: 300ms;
}
.expanded .aicon .primary {
  transform: scale(0, 1);
  transition: 300ms;
}
.expanded .aicon .pointer {
  transform: scale(1, 1);
  transition: 300ms 300ms;
}
.expanded .aicon .border {
  stroke: black;
  d: path("m 0,7.6868707 c 3.3910857,0.7685813 9.912697,-9.7295386 10.783623,-6.0228616 0.400705,1.6998983 0.90611,4.0042763 0.907832,8.6989929 0.0017,4.61577 -0.321209,6.664702 -0.907832,9.120293 C 9.7258143,23.5755 3.6575543,12.772609 0,13.485801");
}
.aicon .pointer {
  transform: scale(0, 1);
}
.aicon .primary {
  transition: 300ms 300ms;
}
.expanded .aicon,
.aicon:hover {
  filter: invert(0) drop-shadow(0 0 10px black);
}
.expanded .aicon_filter {
  transform: translate(-25px, -50%);
}
.aicon.aicon_options {
  transform: translate(2px, -50%) rotate(180deg);
}
.expanded .aicon.aicon_options {
  transform: translate(25px, -50%) rotate(180deg);
}
body {
  font-family: Alice, serif;
  --aside-shade: rgba(255, 255, 255, 0.65);
}
body:has(main > *) {
  --aside-shade: rgba(0, 0, 0, 0.65);
}
body main:empty {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
  position: relative;
}
body main:empty::before {
  content: '';
  background: var(--bg) no-repeat center center;
  position: absolute;
  inset: 0;
  opacity: 0.05;
}
body main:empty::after {
  content: attr(data-empty);
  color: #333;
  text-align: center;
  font-size: 5em;
  white-space: pre;
  text-shadow: 0 0 10px black,0 0 10px black,0 0 10px black;
  position: relative;
  font-family: Filosofer-Regular, serif;
  font-variant: small-caps;
}
.compile {
  position: fixed;
  top: 0;
  left: 50%;
  margin-left: -38px;
  background: url('/assets/grimoire/images/compile.svg') no-repeat;
  width: 76px;
  height: 38px;
  cursor: pointer;
  z-index: 750;
  transition: 300ms;
  display: none;
}
.compile:has( ~ main:not(:empty)):not(.disabled) {
  display: flex;
}
.compile:hover {
  filter: invert(100%);
}
body:has(>.overlay) {
  overflow: hidden;
}
body > .overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 1200;
}
body > .overlay > * {
  padding: 4vw 8vw;
  background: linear-gradient(-6deg, transparent, black 15%, black 85%, transparent);
  min-width: 500px;
  min-height: 400px;
  position: absolute;
}
body > .overlay > *::before,
body > .overlay > *::after {
  content: '';
  position: absolute;
  right: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image: url('/assets/grimoire/images/modal_deco.svg');
  background-position: right top;
  background-size: auto auto;
  filter: invert(100%) drop-shadow(0 0 10px black);
  inset: -21px;
}
body > .overlay > *::after {
  transform: rotate(180deg);
}
body > .overlay > * header {
  font-size: 1.5em;
}
.progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
}
.progress header {
  font-variant: small-caps;
  text-align: center;
}
.progress button {
  display: none;
}
.progress .fail ~ button {
  display: flex;
  pointer-events: auto;
  opacity: 1;
}
.progress .bar[style] {
  margin-top: 1em;
  height: 2em;
  border: 1px solid white;
  position: relative;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.025), transparent, rgba(255, 255, 255, 0.025)), conic-gradient(from 0 at 50% 5px, transparent, transparent calc( 25% + (25% - 25% * var(--size) - 1%)), white calc(  25% + (25% - 25% * var(--size))), white calc(  50% + 25% * var(--size)), transparent calc(  50% + 25% * var(--size) + 1%), transparent);
  background-repeat: no-repeat;
  background-size: 100% 100% ;
  background-position: center;
  mask: url('/assets/grimoire/images/progress.svg');
  mask-position: center;
  mask-repeat: no-repeat;
  width: 450px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 15px;
  transition: 300ms linear;
  filter: drop-shadow(0 0 10px white);
}
.progress .bar[style]::before {
  content: attr(data-content);
  text-align: center;
  mix-blend-mode: difference;
  color: white;
  font-weight: bold;
}
.progress .bar[style]::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 32px;
  height: 14px;
  background: url('/assets/grimoire/images/progress_active.svg');
  filter: invert(100%);
  opacity: var(--blink);
}
body > aside.filter {
  left: 0;
  transform: translate(-100%, 0);
}
body > aside.filter.expanded {
  transform: translate(0, 0);
  filter: drop-shadow(5px 0 10px var(--aside-shade));
}
body > aside.filter::before,
body > aside.filter::after {
  left: calc( 100% - 1px );
}
body > aside.filter > .aicon {
  left: 100%;
}
body > aside.options {
  right: 0;
  transform: translate(100%, 0);
}
body > aside.options:has( ~ main:empty ) {
  display: none;
}
body > aside.options.expanded {
  filter: drop-shadow(5px 0 10px var(--aside-shade));
}
body > aside.options::before,
body > aside.options::after {
  right: calc( 100% - 1px );
  left: auto;
  transform-origin: right top;
  mask: 
			linear-gradient(to right, black, black) no-repeat subtract
			, radial-gradient( 50px at 0 100%, black, black 97%,  transparent 100% ) no-repeat
		;
}
body > aside.options::after {
  transform-origin: right bottom;
  mask: 
			linear-gradient(to right, black, black) no-repeat subtract
			, radial-gradient( 50px at 0 0, black, black 97%,  transparent 100% ) no-repeat
		;
}
body > aside.options > .aicon {
  right: 100%;
}
body > aside.options form > div {
  --display: flex;
  flex-direction: column;
}
body > aside {
  position: fixed;
  background: black;
  top: 0;
  bottom: 0;
  color: white;
  transition: 300ms;
  z-index: 850;
}
body > aside.expanded {
  transform: translate(0, 0);
}
body > aside.expanded::before,
body > aside.expanded::after {
  transform: scale(1);
}
body > aside::before,
body > aside::after {
  content: '';
  width: 50px;
  height: 50px;
  background: black;
  position: absolute;
  transform-origin: left top;
  transform: scale(0);
  transition: 600ms;
  mask: 
			linear-gradient(to right, black, black) no-repeat subtract
			, radial-gradient( 50px at 100% 100%, black, black 97%,  transparent 100% ) no-repeat
		;
}
body > aside::after {
  transform-origin: left bottom;
  mask: 
			linear-gradient(to right, black, black) no-repeat subtract
			, radial-gradient( 50px at 100% 0, black, black 97%,  transparent 100% ) no-repeat
		;
}
body > aside::before {
  top: -1px;
}
body > aside::after {
  bottom: -1px;
}
body > aside > .aicon {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
}
body > aside:nth-of-type(1) .tabs > :not(a) {
  background-image: linear-gradient(to bottom, white, transparent);
  background-size: 2px 90px;
  background-repeat: no-repeat;
}
body > aside:nth-of-type(1) .tabs > :nth-last-child( 1 of :not(a)) {
  background-image: linear-gradient(to bottom, white, transparent), linear-gradient(to bottom, white, transparent);
  background-size: 2px 90px
				,2px 100%;
  background-position: left top
				, right top;
}
body > aside .tabs {
  display: grid;
  height: 100%;
  padding: 20px;
  grid-auto-columns: var(--col-size);
  grid-template-rows: 45px 1fr;
  --col-size: 110px;
}
body > aside .tabs > a {
  grid-row: 1;
  position: relative;
  line-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-bottom: none;
  font-size: 1.1em;
  cursor: pointer;
  border-radius: 0 10px 0 0;
  transition: 300ms;
}
body > aside .tabs > a::before {
  content: '';
  background: url('/assets/grimoire/images/tab.png');
  height: 29px;
  width: 98px;
  position: absolute;
  left: -8px;
  top: -14px;
  opacity: 0;
  transition: 300ms;
}
body > aside .tabs > a.active {
  border-color: white;
}
body > aside .tabs > a.active::before {
  opacity: 1;
}
body > aside .tabs > a.active + * {
  display: var(--display);
  overflow: auto;
}
body > aside .tabs > a:only-of-type {
  grid-column: 1 / 4;
  border-radius: 10px 0 0 0;
}
body > aside .tabs > a:only-of-type::before {
  left: auto;
  right: -8px;
  transform: scale(-1, 1);
}
body > aside .tabs:has( > :nth-child(4 of a )) a + * {
  grid-column: 1 / 5;
}
body > aside .tabs > a + * {
  display: none;
  grid-column: 1 / 4;
  padding: 10px 10px 0;
  position: relative;
  background-image: linear-gradient(to bottom, white, transparent);
  background-size: 2px 100%;
  background-repeat: no-repeat;
}
body > aside .tabs > a + *:nth-last-child( 1 of :not(a)) {
  background-image: linear-gradient(to bottom, white, transparent), linear-gradient(to bottom, white, transparent);
  background-size: 2px 100%
					, 2px 90px;
  background-position: left top
					, right top;
}
body > aside .tabs > a + *::before,
body > aside .tabs > a + *::after {
  content: '';
  position: absolute;
  top: 0;
  background-repeat: no-repeat;
  height: 2px;
}
body > aside .tabs > a + *::before {
  background: white;
  left: 0;
}
body > aside .tabs > a + *::after {
  background: linear-gradient(to right, white, transparent);
  right: 0;
}
body > aside .tabs > a + *:nth-child( 1 of :not(a))::before {
  width: 0;
}
body > aside .tabs > a + *:nth-child( 1 of :not(a))::after {
  left: calc( var(--col-size) * 1 - 2px );
}
body > aside .tabs > a + *:nth-child( 2 of :not(a))::before {
  width: calc( calc( var(--col-size) * 1 ) + 2px );
}
body > aside .tabs > a + *:nth-child( 2 of :not(a))::after {
  left: calc( var(--col-size) * 2 - 2px );
}
body > aside .tabs > a + *:nth-child( 3 of :not(a))::before {
  width: calc( calc( var(--col-size) * 2 ) + 2px );
}
body > aside .tabs > a + *:nth-child( 3 of :not(a))::after {
  left: calc( var(--col-size) * 3 - 2px );
}
body > aside .tabs > a + *:nth-child( 4 of :not(a))::before {
  width: calc( calc( var(--col-size) * 3 ) + 2px );
}
body > aside .tabs > a + *:nth-child( 4 of :not(a))::after {
  width: 0;
}
body > aside .search {
  --display: flex;
  flex-direction: column;
}
body > aside .search label:has(>input[type="text"]) {
  display: flex;
  gap: 1em;
  align-items: center;
  flex: 0;
}
body > aside .search label:has(>input[type="text"])::before,
body > aside .search label:has(>input[type="text"])::after {
  font-size: 3em;
}
body > aside .search label:has(>input[type="text"])::before {
  content: '{';
}
body > aside .search label:has(>input[type="text"])::after {
  content: '}';
}
body > aside .search input {
  background-image: linear-gradient(to right, transparent, white, transparent), linear-gradient(to right, transparent, white, transparent);
  background-repeat: no-repeat;
  background-size: 100% 2px, 100% 2px;
  background-position: center top, center bottom;
  background-color: transparent;
  font-family: serif;
  color: white;
  border: none;
  flex: 1;
  width: 0;
  height: 2lh;
  font-size: 1.2em;
}
body > aside .search .tree {
  padding-top: 10px;
}
body > aside .search .tree[data-empty]::before {
  content: attr(data-empty);
  text-align: center;
  font-size: 1.2em;
  font-variant: small-caps;
}
body > aside form {
  --display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
body > aside form button {
  margin-top: auto;
  border-top: 20px solid transparent;
  border-bottom: 10px solid transparent;
  position: sticky;
  bottom: 0;
  mask: linear-gradient(to bottom, transparent, black 20px, black);
}
body > aside form span.delimiter {
  text-transform: lowercase;
  font-variant: small-caps;
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
body > aside form span.delimiter::before,
body > aside form span.delimiter::after {
  content: '';
  height: 1px;
  flex: 1 0 0;
  background: linear-gradient(to right, white, transparent);
}
body > aside form span.delimiter::before {
  transform: rotate(180deg);
}
body > aside form span.delimiter:not(:first-child) {
  margin-top: 8px;
}
body > aside form :not( span ) + .multiselect,
body > aside form .text,
body > aside form .bool {
  margin-top: 20px;
}
body > aside form .bool {
  display: flex;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
body > aside form .multiselect > span:first-child {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
body > aside form .multiselect,
body > aside form .text,
body > aside form .bool {
  display: grid;
  gap: 4px 2px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 26px;
}
body > aside form .multiselect:has( > :nth-child(10)),
body > aside form .text:has( > :nth-child(10)),
body > aside form .bool:has( > :nth-child(10)) {
  grid-template-columns: repeat(5, 1fr);
}
body > aside form .multiselect > span:first-child,
body > aside form .text > span:first-child,
body > aside form .bool > span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
body > aside form .multiselect label:not(:has( > input:not([type="text"]))) input,
body > aside form .text label:not(:has( > input:not([type="text"]))) input,
body > aside form .bool label:not(:has( > input:not([type="text"]))) input {
  width: 100%;
  min-width: 0;
  padding: 0.5em 1em;
  background: transparent;
  color: white;
  border: 1px solid gray;
  text-align: center;
  border-radius: 10px 20px / 20px 10px;
}
body > aside form .multiselect label:has( > input:not([type="text"])),
body > aside form .text label:has( > input:not([type="text"])),
body > aside form .bool label:has( > input:not([type="text"])) {
  position: relative;
  justify-content: center;
  background: gray;
  cursor: pointer;
  mask: 
					linear-gradient( to right, black, black ) no-repeat subtract
					, radial-gradient( circle 22px at 0% 0%, black, black 50%, transparent 50%, transparent ) no-repeat add
					, radial-gradient( circle 22px at 0% 100%, black, black 50%, transparent 50%, transparent ) no-repeat add
					, radial-gradient( circle 22px at 100% 0%, black, black 50%, transparent 50%, transparent ) no-repeat add
					, radial-gradient( circle 22px at 100% 100%, black, black 50%, transparent 50%, transparent ) no-repeat add

				;
}
body > aside form .multiselect label:has( > input:not([type="text"]))::before,
body > aside form .text label:has( > input:not([type="text"]))::before,
body > aside form .bool label:has( > input:not([type="text"]))::before {
  content: '';
  position: absolute;
  inset: 0;
  background: black;
  z-index: -1;
  mask: 
						linear-gradient( to right, black, black ) top 1px left 1px / calc(100% - 2px) calc(100% - 2px) no-repeat subtract
						, radial-gradient( circle 24px at 0% 0%, black, black 50%, transparent 50%, transparent ) no-repeat add
						, radial-gradient( circle 24px at 0% 100%, black, black 50%, transparent 50%, transparent ) no-repeat add
						, radial-gradient( circle 24px at 100% 0%, black, black 50%, transparent 50%, transparent ) no-repeat add
						, radial-gradient( circle 24px at 100% 100%, black, black 50%, transparent 50%, transparent ) no-repeat add

					;
  pointer-events: none;
  transition: 300ms;
}
body > aside form .multiselect label:has( > input:not([type="text"])):hover,
body > aside form .text label:has( > input:not([type="text"])):hover,
body > aside form .bool label:has( > input:not([type="text"])):hover {
  background: white;
}
body > aside form .multiselect label:has( > input:not([type="text"])):has( > input:checked ),
body > aside form .text label:has( > input:not([type="text"])):has( > input:checked ),
body > aside form .bool label:has( > input:not([type="text"])):has( > input:checked ) {
  background: white;
  color: black;
}
body > aside form .multiselect label:has( > input:not([type="text"])):has( > input:checked )::before,
body > aside form .text label:has( > input:not([type="text"])):has( > input:checked )::before,
body > aside form .bool label:has( > input:not([type="text"])):has( > input:checked )::before {
  opacity: 0;
}
body > aside form .multiselect label:has( > input:not([type="text"])) input,
body > aside form .text label:has( > input:not([type="text"])) input,
body > aside form .bool label:has( > input:not([type="text"])) input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
body > aside form .text {
  grid-auto-rows: auto;
  margin-top: 10px;
}
body > aside form .dependant {
  display: none;
}
body > aside form div:has(>.multiselect>label>input[value="1"]:checked) > .dependant {
  display: contents;
}
body > aside label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: 300ms;
  flex: 1 0 auto;
}
body > aside .tree {
  display: flex;
  flex-direction: column;
  flex: 1 0 0;
  overflow: auto;
}
body > aside .tree::after {
  content: '';
  flex: 0 0 30px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, black, transparent);
  pointer-events: none;
}
body > aside .tree .children {
  display: flex;
  flex-direction: column;
  padding-left: 20px;
}
body > aside .tree label {
  padding-left: 10px;
  flex: 0 0 1lh;
  line-height: 1.4;
  position: relative;
  background-repeat: no-repeat;
}
body > aside .tree label::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -100;
  opacity: 0;
  transition: 300ms;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.65));
  mask: linear-gradient(to right, black) subtract, radial-gradient(farthest-side at right top, black 0%, black 90%, transparent 100%, transparent 100%) right top / 32px 50% no-repeat add, radial-gradient(farthest-side at right bottom, black 0%, black 90%, transparent 100%, transparent 100%) right bottom / 32px 50% no-repeat subtract;
}
body > aside .tree label:has(>input[type="checkbox"]):has(>input[disabled]) {
  pointer-events: none;
}
body > aside .tree label:has(>input[type="checkbox"]):has(>input[disabled])::before {
  border-radius: 100%;
  background: white;
  box-shadow: 0 0 0 3px black inset
							, 0 0 0 2px white;
  opacity: 0.65;
}
body > aside .tree label:has(>input[type="checkbox"]) > input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
body > aside .tree label:has(>input[type="checkbox"])::before {
  content: '';
  width: 12px;
  height: 12px;
  background-color: white;
  border-radius: 2px 4px / 7px;
  transition: 300ms;
  flex-shrink: 0;
}
body > aside .tree label:has(>input[type="checkbox"]):hover::before {
  box-shadow: 0 0 0px 2px black
						,0 0 8px 5px white;
}
body > aside .tree label:has(>input[type="checkbox"]):has( > input:checked ) {
  text-shadow: 0 0 2px black;
}
body > aside .tree label:has(>input[type="checkbox"]):has( > input:checked )::after {
  opacity: 1;
}
body > aside .tree label:has(>input[type="checkbox"]):has( > input:checked:not(:disabled))::before {
  opacity: 1;
  background: black;
  box-shadow: 0 0 0 3px white inset;
  transform: rotate(45deg);
}
body > aside .tree label:has(>input[type="checkbox"]):has( > input:checked:not(:disabled)):hover::before {
  box-shadow: 0 0 0 3px white inset
							, 0 0 0px 2px black
							, 0 0 8px 5px white;
}
.text_block {
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.text_block > div {
  display: flex;
  align-items: center;
  gap: 1em;
}
.text_block > div svg {
  flex: 0 0 45px;
}
.text_block p:first-of-type {
  margin-top: 2em;
}
.text_block p strong {
  color: Turquoise;
}
.floater {
  position: fixed;
  background: black;
  color: white;
  padding: 2em;
  display: flex;
  flex-direction: column;
  z-index: 900;
  transform: translate(-50%, calc( -100% - 20px ));
}
.floater::after {
  content: '';
  position: absolute;
  left: calc( 50% - 20px );
  top: calc(100% - 20px);
  width: 40px;
  height: 40px;
  background: black;
  transform: rotate(-45deg);
}
.floater p {
  font-size: 2em;
  text-align: center;
  margin: 9px;
}
.notifies {
  position: fixed;
  width: 0;
  bottom: 20px;
  left: 50vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.5em;
}
.notifies > * {
  background: lightgreen;
  color: black;
  padding: 0.5em;
  border-radius: 100px;
  transform-origin: center bottom;
}
.page.overflown {
  justify-content: flex-start;
}
.page.overflown::before {
  content: 'Содержимое не поместится на странице, попробуйте другой формат';
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  background: red;
  color: white;
  font-size: 40px;
  z-index: 600;
}
body.cut_marks .page .shadow > .active {
  width: calc(var(--card-width)*1px + calc( var(--card-outline) * 2px ));
  height: calc(var(--card-height)*1px + calc( var(--card-outline) * 2px ));
  border: calc( var(--card-outline) * 1px ) solid transparent;
}
body.cut_marks .page .shadow > .active::before,
body.cut_marks .page .shadow > .active::after {
  content: '';
  position: absolute;
  inset: 0;
}
body.cut_marks .page .shadow > .active::before {
  top: -80px;
  bottom: -80px;
  border-left: 1px solid black;
  border-right: 1px solid black;
}
body.cut_marks .page .shadow > .active::after {
  left: -80px;
  right: -80px;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
}
.page .shadow {
  position: absolute;
  inset: calc( -1px * var(--page-padding) );
  border: calc( 1px * var(--page-padding) ) transparent solid;
  display: grid;
  z-index: -1;
  justify-content: var(--page-cards-jc);
  align-content: var(--page-cards-ai);
  grid-template-columns: repeat(var(--cols), auto);
  grid-template-rows: repeat(var(--rows), auto);
}
.page .shadow > * {
  width: calc(var(--card-width)*1px);
  height: calc(var(--card-height)*1px);
}
.page .shadow > *.active {
  position: relative;
}
.page {
  break-after: always;
  position: relative;
  border: calc( 1px * var(--page-padding) ) transparent solid;
  width: calc( var(--page-width) * 300px );
  height: calc( var(--page-height) * 300px );
  display: flex;
  align-items: center;
  justify-content: center;
}
.page:has( > .spell ) {
  display: grid;
  justify-content: var(--page-cards-jc);
  align-content: var(--page-cards-ai);
  grid-template-columns: repeat(var(--cols), auto);
  grid-template-rows: repeat(var(--rows), auto);
  --cols: round(
			down,
			calc(
				(var(--page-width)*300 - var(--page-padding) * 2 - var( --bleed-outer ) * 2 )
				/
				( var(--card-width) + var( --card-outline ) * 2 )
			)
		);
  --rows: round(
			down,
			calc(
				(var(--page-height)*300 - var(--page-padding) * 2 - var( --bleed-outer ) * 2 )
				/
				( var(--card-height) + var( --card-outline ) * 2 )
			)
		);
}
.page.placeholder {
  grid-template-rows: none;
  height: auto;
}
.page::after {
  content: '';
  position: absolute;
  inset: calc( var(--page-padding) * -1px - 1px );
  border-bottom: 1px dotted gray;
  border-right: 1px dotted gray;
  pointer-events: none;
}
body.compiling .page::after {
  opacity: 0;
}
.box.rotated {
  transform: rotate(90deg);
}
.box {
  align-items: center;
  justify-content: center;
}
.box *:has( > .info ) {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.box *:has( > .info ) > * {
  display: flex;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  padding: 5px 10px;
  color: black;
}
.box .info {
  font-size: calc( var(--box-size-depth, 25) * 1.1px );
}
.box *:has(.class) {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc( 5 * var(--pixels-per-mm) * 1.5px );
  padding: calc( var(--box-size-depth, 25) * var(--pixels-per-mm) * 1.5px ) 0;
}
.box *:has(.class).right {
  transform: rotate(180deg);
}
.box *:has(.class) > .class {
  writing-mode: vertical-lr;
  text-transform: capitalize;
  font-size: calc( var(--box-size-depth, 25) * 2px );
  color: rgba(255, 255, 255, 0.65);
  gap: 0.25em;
}
.box *:has(.class) > .class img {
  transform: rotate(90deg);
}
.box.default *:has(.class) {
  gap: 0;
}
.box.default *:has(.class) > .class {
  font-size: calc( var(--box-size-depth, 25) * 1px );
  letter-spacing: -5px;
  margin: 0 7px;
  gap: 20px;
}
.box.default *:has(.class) > .class img {
  transform: none;
  filter: invert(100%);
  width: 55px;
}
.box .class {
  white-space: nowrap;
  color: white;
  display: flex;
  align-items: center;
  gap: 1em;
  text-transform: lowercase;
  font-family: Filosofer-Regular, sans-serif;
}
.box .class img {
  flex: 0 0 0;
  filter: drop-shadow(0 0 20px white);
  max-width: 75px;
}
.box .deco {
  background-size: 100% 100%;
}
.box .body {
  color: white;
  font-family: Filosofer-Bold;
  font-size: 40px;
  font-variant: small-caps;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding-bottom: 100px;
  --schools-bg: linear-gradient(to right, transparent, transparent);
  --color-hsl-s: 50%;
  --color-hsl-l: 50%;
}
.box .body .deco {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
  background-image: url('/assets/grimoire/images/box_deco.svg'), url('/assets/grimoire/images/noise.png'), var(--schools-bg);
  background-repeat: no-repeat, repeat, no-repeat;
  background-position: center center;
  background-size: 100% 100%, auto auto, 100% 100%;
  pointer-events: none;
  z-index: -1;
  filter: saturate( var(--c-box-saturation, 1) ) brightness( var(--c-box-brightness, 1) ) hue-rotate( calc(var(--c-box-hue, 1) * 1deg) );
}
.box .body .logo {
  width: 35%;
  display: block;
  aspect-ratio: 46 / 36;
  background-image: url('/assets/grimoire/images/logo.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% auto;
}
.box .body [contenteditable] {
  min-width: 50px;
  min-height: 1lh;
  max-width: 80%;
  word-break: break-all;
  font-size: calc( var(--box-heading-font-size, 3.5) * var(--pixels-per-mm) * 1px );
}
.box .body [contenteditable]:empty {
  outline: 1px dotted white;
}
.box .body .schools {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 70%;
  gap: 5%;
  order: -100;
}
.box .body .schools > * {
  flex: 0 1 30%;
  aspect-ratio: 1 / 1;
  background-image: var(--sigil);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center center;
  opacity: 0.65;
}
.box .body .schools > :not(:first-child):not(:last-child),
.box .body .schools > :only-child {
  margin-bottom: 40px;
}
.box .body .schools > :nth-last-child(4),
.box .body .schools > :nth-child(4) {
  margin-bottom: -80px;
}
.box .body .schools ~ .schools {
  order: 900;
  flex-direction: row-reverse;
}
.box .body .schools ~ .schools > :not(:first-child):not(:last-child),
.box .body .schools ~ .schools > :only-child {
  margin-bottom: 0;
  margin-top: 40px;
}
.box .body .schools ~ .schools > :nth-last-child(4),
.box .body .schools ~ .schools > :nth-child(4) {
  margin-top: -80px;
  margin-bottom: 0;
}
.box .body .schools:has( > :nth-child(4)) > *,
.box .body .schools:has( > :nth-child(4)) ~ .schools > * {
  flex-basis: 21.25%;
}
.box.manual {
  align-items: center;
  display: flex;
}
.box.manual > .left,
.box.manual > .right,
.box.manual > .left_wrap,
.box.manual > .right_wrap {
  width: calc( var(--box-size-depth, 25) * var(--pixels-per-mm) * 1px );
  height: calc(
			var(--box-size-depth, 25) * var(--pixels-per-mm) * 3px
			+
			var(--box-size-height, 100) * var(--pixels-per-mm) * 1px
		);
  background: black;
}
.box.manual > .left_wrap,
.box.manual > .right_wrap {
  width: calc( var(--box-size-depth, 25) * var(--pixels-per-mm) * 0.5px );
}
.box.manual > .front .top,
.box.manual > .front .top_wrap,
.box.manual > .front .bottom,
.box.manual > .front .bottom_wrap {
  width: calc( var(--box-size-width, 100) * var(--pixels-per-mm) * 1px );
  height: calc( var(--box-size-depth, 25) * var(--pixels-per-mm) * 1px );
  background: black;
}
.box.manual > .front .top_wrap,
.box.manual > .front .bottom_wrap {
  height: calc( var(--box-size-depth, 25) * var(--pixels-per-mm) * 0.5px );
}
.box.manual > .front .body {
  width: calc( var(--box-size-width, 100) * var(--pixels-per-mm) * 1px );
  height: calc( var(--box-size-height, 100) * var(--pixels-per-mm) * 1px );
}
.box.manual .info_target > * {
  transform: rotate(180deg);
}
.box.default {
  display: flex;
  align-items: center;
  --deck-depth: max(
		calc( 6px * var(--pixels-per-mm) )
		, calc( 1px * (var(--page-paper-width, 0.2) * var(--cards-total, 0) + 2) * var( --pixels-per-mm ) )
	);
  --deck-height: calc( var(--card-height) * 1px + 2px * var( --pixels-per-mm ) );
  --deck-width: calc( var(--card-width) * 1px + 2px * var( --pixels-per-mm ) );
  --helper-size: calc( 10px * var( --pixels-per-mm ) );
  --closer-size: var(--helper-size);
}
.box.default.deep .rear .top,
.box.default.deep .front .top,
.box.default.deep .rear .bottom,
.box.default.deep .front .bottom {
  display: none;
}
.box.default.deep .rear .top_closer,
.box.default.deep .front .top_closer,
.box.default.deep .rear .bottom_closer,
.box.default.deep .front .bottom_closer {
  height:  calc( var(--deck-depth) / 2 ) ;
  background: black;
}
.box.default.deep .rear .top_closer,
.box.default.deep .front .top_closer {
  border-radius:  calc( var(--deck-depth) / 4 )   calc( var(--deck-depth) / 4 )  0 0;
}
.box.default.deep .rear .bottom_closer,
.box.default.deep .front .bottom_closer {
  border-radius: 0 0  calc( var(--deck-depth) / 4 )   calc( var(--deck-depth) / 4 ) ;
}
.box.default.deep .rear .body,
.box.default.deep .front .body {
  mask: none;
}
.box.default.deep .left .top,
.box.default.deep .left .bottom {
  height: var(--deck-width);
}
.box.default.deep .left .top_closer,
.box.default.deep .left .bottom_closer {
  height: var(--helper-size);
}
.box.default.deep .left .top_closer {
  border-radius: var(--closer-size) var(--closer-size) 0 0;
}
.box.default.deep .left .bottom_closer {
  border-radius: 0 0 var(--closer-size) var(--closer-size);
}
.box.default.deep .right {
  mask: 
				linear-gradient(to right, black, black) subtract,
				radial-gradient( closest-side at center, black, black 100%, transparent ) no-repeat 50% -60px / 120px 120px
				;
}
.box.default.deep .right .top,
.box.default.deep .right .bottom,
.box.default.deep .right .top_closer,
.box.default.deep .right .bottom_closer {
  display: none;
}
.box.default.deep .left .main,
.box.default.deep .right .main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: black url('/assets/grimoire/images/logo.svg') no-repeat center / auto 20%;
}
.box.default .glue {
  height: var(--deck-height);
  width: var(--helper-size);
  border-radius: var(--helper-size) 0 0 var(--helper-size);
}
.box.default .top_closer {
  border-radius: var( --closer-size ) var( --closer-size ) 0 0;
}
.box.default .bottom_closer {
  border-radius: 0 0 var( --closer-size ) var( --closer-size );
}
.box.default .rear > :not(.body) {
  width: var(--deck-width);
  background: black;
}
.box.default .rear .top_closer,
.box.default .rear .bottom_closer {
  height: var(--helper-size);
}
.box.default .rear .top,
.box.default .rear .bottom {
  height: var(--deck-depth);
}
.box.default .rear .body {
  width: var(--deck-width);
  height: var(--deck-height);
}
.box.default .left,
.box.default .right {
  width: var(--deck-depth);
  --closer-size: var(--deck-depth);
}
.box.default .left .top_closer,
.box.default .right .top_closer,
.box.default .left .bottom_closer,
.box.default .right .bottom_closer {
  height: calc( var(--deck-depth) / 2 );
}
.box.default .left .main,
.box.default .right .main {
  width: var(--deck-depth);
  height: var(--deck-height);
}
.box.default .left > *,
.box.default .right > * {
  background: black;
}
.box.default .front .body {
  width: var(--deck-width);
  height: var(--deck-height);
  background: black;
  display: grid;
  grid-template-rows: 1fr  auto 1fr;
  grid-auto-flow: column;
  padding: 0 2em;
  mask: 
				linear-gradient(to right, black, black) subtract,
				radial-gradient( closest-side at center, black, black 100%, transparent ) no-repeat 50% -60px / 120px 120px
				;
}
.box.default .front .body::before,
.box.default .front .body::after {
  content: '';
  grid-row: 1;
  height: 100%;
}
.box.default .front .body::after {
  grid-row: 3;
}
.box.default .front .body > * {
  grid-row: 2;
}
.box.default .front .body > .class {
  writing-mode: vertical-lr;
  text-orientation: upright;
  height: 100%;
}
.box.default > * > *,
.box.default .glue {
  box-shadow: 0 0 0 1px black inset;
}
.box.default .front > *,
.box.default .rear > * {
  position: relative;
}
.spell_placeholder {
  width: calc(var(--card-width)*1px + calc( var(--card-outline) * 2px ));
  height: calc(var(--card-height)*1px + calc( var(--card-outline) * 2px ));
  border: calc( var(--card-outline) * 1px ) solid transparent;
  position: relative;
}
.spell_placeholder::before {
  content: '';
  inset: 0;
  border: 2px dashed lightgray;
  position: absolute;
}
body.compiling .spell_placeholder {
  opacity: 0;
}
.spell {
  --footer-height: 50px;
  --decoration-margin: 25px;
  --bg-size: 25px;
  font-family: 'Alice', serif;
  width: calc(var(--card-width)*1px + calc( var(--card-outline) * 2px ));
  height: calc(var(--card-height)*1px + calc( var(--card-outline) * 2px ));
  font-size: 16px;
  position: relative;
  z-index: 400;
  display: flex;
  flex-direction: column;
  border: calc( var(--card-outline) * 1px ) solid black;
}
.spell .decoration {
  pointer-events: none;
}
.spell .expander {
  flex-grow: 1;
}
.spell.face .bg {
  inset: 0;
  position: absolute;
  z-index: -10;
  background: url("/assets/grimoire/images/bg_paper_full.jpg");
  filter: saturate( var(--c-text-bg-saturation, 1) ) brightness( var(--c-text-bg-brightness, 1) ) hue-rotate( calc(var(--c-text-bg-hue, 1) * 1deg) );
}
.spell a[name] {
  position: absolute;
}
.spell.back {
  --line-height-adjustment-step: 0.01;
}
.spell.back header {
  color: white;
}
.spell.back header .misc .level {
  color: black;
}
.spell.back header .flags,
.spell.back header .components {
  filter: invert(100%);
}
.spell.back .decoration {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.25));
  mask: linear-gradient(to right, black, black);
}
.spell.back .description {
  padding-top: 25px;
  margin-top: auto;
  flex: 0 1 auto;
  margin-bottom: 0;
  padding-bottom: 35px;
}
.spell.back .description + .extras {
  margin-top: 0;
}
.spell.back .description.padded {
  padding-bottom: 2.25lh;
}
.spell.back .description.last_aligned > p:last-child,
.spell.back .description.last_aligned ul:last-child > li:last-child {
  text-align-last: right;
}
.spell header {
  display: flex;
  overflow: hidden;
  align-items: center;
  z-index: 500;
  margin: calc( var(--pixels-per-mm) * 2px ) calc( var(--pixels-per-mm) * 2px ) 0;
  min-height: 156px;
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}
.spell header .flags {
  width: calc( var(--pixels-per-mm) * 10px );
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding-top: calc( var(--pixels-per-mm) * 1.5px );
  padding-left: calc( var(--pixels-per-mm) * 2px );
}
.spell header .flags > * {
  width: 50%;
  padding-top: 50%;
  margin: 5px 0;
  position: relative;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.spell header .flags .concentration {
  background-image: url(/assets/grimoire/images/icons/concentration.svg);
}
.spell header .flags .ritual {
  background-image: url(/assets/grimoire/images/icons/ritual.svg);
}
.spell header .name {
  flex-grow: 1;
  text-align: center;
  align-self: flex-start;
  font-family: Filosofer-Regular;
  font-size: 1.8em;
  position: relative;
  padding: calc( var(--bg-size) + 1px * var(--pixels-per-mm) ) calc(var(--pixels-per-mm) * 1px)  0;
}
.spell header .name span {
  display: block;
}
.spell header .name span.original {
  font-size: 0.65em;
  line-height: 1;
  opacity: 0.75;
}
.spell header .name span.localized {
  font-size: 2em;
  line-height: .75;
}
.spell header .name span:last-child {
  margin-top: calc( var(--pixels-per-mm) * 0.5px );
}
.spell header .name i {
  position: absolute;
  opacity: 0;
  left: 100%;
  right: auto;
  top: 0;
  z-index: 200;
}
.spell header .name i:first-of-type {
  right: 100%;
  left: auto;
}
.spell header .misc {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.spell header .misc .level {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 76px;
  border: 5px solid black;
  background-color: black;
  background-image: radial-gradient(closest-side at center, white, white 98%, transparent);
  position: relative;
  z-index: 400;
  border-radius: 100% 0 100% 100%;
  width: calc( var(--pixels-per-mm) * 10px );
  height: calc( var(--pixels-per-mm) * 10px );
  top: -5px;
  right: -5px;
}
.spell header .misc .components {
  width: 100%;
  text-align: center;
  padding-top: 10px;
  font-size: 24px;
  height: 40px;
  display: flex;
  justify-content: center;
  position: relative;
  right: 26px;
}
.spell header .misc .components > div {
  width: 40px;
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}
.spell header .misc .components .verbal {
  background-image: url('/assets/grimoire/images/icons/verbal.svg');
}
.spell header .misc .components .somatic {
  background-image: url('/assets/grimoire/images/icons/somatic.svg');
}
.spell header .misc .components .material {
  background-image: url('/assets/grimoire/images/icons/material.svg');
}
.spell .sigil {
  background: var(--sigil) no-repeat center center;
  background-size: 80%;
  filter: invert(100%);
  position: absolute;
  inset: 0;
  mask: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
  z-index: -1;
  opacity: 0.3;
}
.spell.back .sigil {
  filter: none;
  mask: linear-gradient(to bottom, transparent, black);
}
.spell.back .description .sigil {
  filter: invert(100%);
  bottom: calc( -1 * var(--footer-height) - var(--decoration-margin) );
  height: calc( var(--card-height) * 1px );
  top: auto;
  z-index: -1;
  opacity: 0.1;
}
.spell .delimiter {
  width: calc(100% - var(--bg-size) * 6);
  min-height: 30px;
  margin: 0 auto;
  opacity: 0.65;
  position: relative;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center center;
}
.spell.back .delimiter {
  filter: invert(100%);
}
.spell .description {
  padding: 0 calc( var(--pixels-per-mm) * 5.5px );
  font-size: calc( var(--pixels-per-mm) * var( --font-size, 2.1 ) * 1px );
  position: relative;
  line-height: 1.4;
  flex: 1;
  margin-bottom: calc( var(--pixels-per-mm) * 2.5px );
  overflow: hidden;
  hyphens: var(--card-description-hyphens);
  /*

				wrout | wrout wrout_a [same-as] wrout wrout_ph

				wrin | wrin
			*/
}
.spell .description p strong {
  text-decoration: underline dashed;
  font-weight: 700;
}
.spell .description p strong:first-child {
  display: inline-block;
  text-indent: 0;
}
.spell .description .upgrade.lvl0 {
  letter-spacing: -0.8px;
}
.spell .description.wrout > p:last-child::before,
.spell .description.wrin > p:last-child::before,
.spell .description.wrout > p:first-child::before,
.spell .description.wrin > p:first-child::before,
.spell .description.wrout > .sigil + p::before,
.spell .description.wrin > .sigil + p::before,
.spell .description.wrout > strong:last-child::before,
.spell .description.wrin > strong:last-child::before,
.spell .description.wrout > ul:first-child > li:first-child::before,
.spell .description.wrin > ul:first-child > li:first-child::before,
.spell .description.wrout > .sigil + ul > li:first-child::before,
.spell .description.wrin > .sigil + ul > li:first-child::before,
.spell .description.wrout > ul:last-child > li:last-child::before,
.spell .description.wrin > ul:last-child > li:last-child::before,
.spell .description.wrout > p:last-child::after,
.spell .description.wrin > p:last-child::after,
.spell .description.wrout > p:first-child::after,
.spell .description.wrin > p:first-child::after,
.spell .description.wrout > .sigil + p::after,
.spell .description.wrin > .sigil + p::after,
.spell .description.wrout > strong:last-child::after,
.spell .description.wrin > strong:last-child::after,
.spell .description.wrout > ul:first-child > li:first-child::after,
.spell .description.wrin > ul:first-child > li:first-child::after,
.spell .description.wrout > .sigil + ul > li:first-child::after,
.spell .description.wrin > .sigil + ul > li:first-child::after,
.spell .description.wrout > ul:last-child > li:last-child::after,
.spell .description.wrin > ul:last-child > li:last-child::after {
  display: inline-block;
  text-indent: 0;
  opacity: 0.75;
  vertical-align: middle;
  white-space: pre;
}
.spell .description.wrout > p:last-child::after,
.spell .description.wrout > strong:last-child::after,
.spell .description.wrout > ul:last-child > li:last-child::after,
.spell .description.wrout > ol:last-child > li:last-child::after,
.spell .description.wrout > table:last-child tr:last-child > td:last-child::after {
  content: '🠪';
  opacity: 0.75;
  vertical-align: middle;
  margin-left: 0.5ch;
}
.spell .description.wrout > table:last-child tr:last-child > :last-child {
  position: relative;
}
.spell .description.wrout > table:last-child tr:last-child > :last-child::after {
  position: absolute;
  right: -13px;
}
.spell .description.wrout.wrout_a > p:last-child::after,
.spell .description.wrout.wrout_ph > p:last-child::after,
.spell .description.wrout.wrout_a > strong:last-child::after,
.spell .description.wrout.wrout_ph > strong:last-child::after,
.spell .description.wrout.wrout_a > ul:last-child > li:last-child::after,
.spell .description.wrout.wrout_ph > ul:last-child > li:last-child::after,
.spell .description.wrout.wrout_a > ol:last-child > li:last-child::after,
.spell .description.wrout.wrout_ph > ol:last-child > li:last-child::after {
  content: '↻';
  /*
								Transform is not in effect for pure-inline things
								Defning inline-block leads to hanging icons =\
							*/
  margin-left: 0.5ch;
}
.spell .description.wrin.wrin_ph > p:first-child::after,
.spell .description.wrin.wrin_ph > .sigil + p::after,
.spell .description.wrin.wrin_ph > strong:first-child::after,
.spell .description.wrin.wrin_ph > .sigil + strong::after {
  content: '↻';
  /*
								Transform is not in effect for pure-inline things
								Defning inline-block leads to hanging icons =\
							*/
  margin-left: 0.5ch;
}
.spell .description.wrin.wrin_ph > ul:first-child > li:first-child,
.spell .description.wrin.wrin_ph > .sigil + ul > li:first-child,
.spell .description.wrin.wrin_ph > ol:first-child > li:first-child,
.spell .description.wrin.wrin_ph > .sigil + ol > li:first-child {
  list-style-type: '↻ 🞙 ';
  list-style-type: none;
}
.spell .description.wrin.wrin_ph > ul:first-child > li:first-child::before,
.spell .description.wrin.wrin_ph > .sigil + ul > li:first-child::before,
.spell .description.wrin.wrin_ph > ol:first-child > li:first-child::before,
.spell .description.wrin.wrin_ph > .sigil + ol > li:first-child::before {
  content: '↻ 🞙 ';
}
.spell .description.wrin.wrin_ph > ul:first-child > li:first-child.continuation,
.spell .description.wrin.wrin_ph > .sigil + ul > li:first-child.continuation,
.spell .description.wrin.wrin_ph > ol:first-child > li:first-child.continuation,
.spell .description.wrin.wrin_ph > .sigil + ol > li:first-child.continuation {
  list-style-type: '↻ ';
  list-style-type: none;
}
.spell .description.wrin.wrin_ph > ul:first-child > li:first-child.continuation::before,
.spell .description.wrin.wrin_ph > .sigil + ul > li:first-child.continuation::before,
.spell .description.wrin.wrin_ph > ol:first-child > li:first-child.continuation::before,
.spell .description.wrin.wrin_ph > .sigil + ol > li:first-child.continuation::before {
  content: '↻ ';
}
.spell .description.wrin > p:first-child::before,
.spell .description.wrin > .sigil + p::before,
.spell .description.wrin > table:first-child tr:first-child > :first-child::before,
.spell .description.wrin > .sigil + table tr:first-child > :first-child::before {
  content: '🠪';
  opacity: 0.75;
  vertical-align: middle;
  margin-right: 0.5ch;
}
.spell .description.wrin > table:first-child tr:first-child > :first-child,
.spell .description.wrin > .sigil + table tr:first-child > :first-child {
  position: relative;
}
.spell .description.wrin > table:first-child tr:first-child > :first-child::before,
.spell .description.wrin > .sigil + table tr:first-child > :first-child::before {
  position: absolute;
  left: -8px;
}
.spell .description.wrin > table:last-child tr:first-child > :first-child {
  position: relative;
}
.spell .description.wrin > table:last-child tr:first-child > :first-child::before {
  left: -8px;
  position: absolute;
}
.spell .description.wrin > p.continuation:first-child,
.spell .description.wrin > .sigil + p.continuation,
.spell .description.wrin > li.continuation:first-child {
  text-indent: 0;
}
.spell .description.wrin > p:not(.continuation):first-child::before,
.spell .description.wrin > .sigil + p:not(.continuation)::before {
  position: absolute;
  left: 0;
}
.spell .description.wrin > ul:first-child > li.continuation:first-child,
.spell .description.wrin > .sigil + ul > li.continuation:first-child,
.spell .description.wrin > ol:first-child > li.continuation:first-child,
.spell .description.wrin > .sigil + ol > li.continuation:first-child {
  list-style-type: none;
}
.spell .description.wrin > ul:first-child > li.continuation:first-child::marker,
.spell .description.wrin > .sigil + ul > li.continuation:first-child::marker,
.spell .description.wrin > ol:first-child > li.continuation:first-child::marker,
.spell .description.wrin > .sigil + ol > li.continuation:first-child::marker {
  color: rgba(0, 0, 0, 0.4);
}
.spell .description.wrin > ul:first-child > li.continuation:first-child::before,
.spell .description.wrin > .sigil + ul > li.continuation:first-child::before,
.spell .description.wrin > ol:first-child > li.continuation:first-child::before,
.spell .description.wrin > .sigil + ol > li.continuation:first-child::before {
  content: '🠪 ';
}
.spell .description.wrin > ol:first-child > li.continuation:first-child::before {
  content: '🠪 ';
}
.spell .description.wrin > ul:first-child > li:not(.continuation):first-child,
.spell .description.wrin > .sigil + ul > li:not(.continuation):first-child,
.spell .description.wrin > ol:first-child > li:not(.continuation):first-child,
.spell .description.wrin > .sigil + ol > li:not(.continuation):first-child {
  list-style-type: none;
}
.spell .description.wrin > ul:first-child > li:not(.continuation):first-child::before,
.spell .description.wrin > .sigil + ul > li:not(.continuation):first-child::before,
.spell .description.wrin > ol:first-child > li:not(.continuation):first-child::before,
.spell .description.wrin > .sigil + ol > li:not(.continuation):first-child::before {
  content: '🠪 🞙 ';
  opacity: 1;
}
.spell .description.wrin.wrin_a > p:first-child.continuation,
.spell .description.wrin.wrin_a > .sigil + p.continuation {
  text-indent: 0.8em;
}
.spell .description.wrin.wrin_a > p:first-child.continuation::before,
.spell .description.wrin.wrin_a > .sigil + p.continuation::before {
  transform: translate(min(-0.85em, -25px), 2px) rotate(-10deg);
}
.spell .description.wrin.wrin_a > p:first-child::before,
.spell .description.wrin.wrin_a > .sigil + p::before {
  content: '↻';
  transform: translate(0, 2px) rotate(-10deg);
  position: absolute;
}
.spell .description.wrin.wrin_a > ul:first-child > li.continuation:first-child,
.spell .description.wrin.wrin_a > .sigil + ul > li.continuation:first-child,
.spell .description.wrin.wrin_a > ol:first-child > li.continuation:first-child,
.spell .description.wrin.wrin_a > .sigil + ol > li.continuation:first-child {
  list-style-type: '↻ ';
  list-style-type: none;
}
.spell .description.wrin.wrin_a > ul:first-child > li.continuation:first-child::before,
.spell .description.wrin.wrin_a > .sigil + ul > li.continuation:first-child::before,
.spell .description.wrin.wrin_a > ol:first-child > li.continuation:first-child::before,
.spell .description.wrin.wrin_a > .sigil + ol > li.continuation:first-child::before {
  content: '↻ ';
}
.spell .description.wrin.wrin_a > ul:first-child > li:not(.continuation):first-child,
.spell .description.wrin.wrin_a > .sigil + ul > li:not(.continuation):first-child,
.spell .description.wrin.wrin_a > ol:first-child > li:not(.continuation):first-child,
.spell .description.wrin.wrin_a > .sigil + ol > li:not(.continuation):first-child {
  list-style-type: none;
}
.spell .description.wrin.wrin_a > ul:first-child > li:not(.continuation):first-child::before,
.spell .description.wrin.wrin_a > .sigil + ul > li:not(.continuation):first-child::before,
.spell .description.wrin.wrin_a > ol:first-child > li:not(.continuation):first-child::before,
.spell .description.wrin.wrin_a > .sigil + ol > li:not(.continuation):first-child::before {
  content: '↻ 🞙 ';
}
.spell .description.wrin.wrin_a > table:last-child tr:first-child > :first-child {
  position: relative;
}
.spell .description.wrin.wrin_a > table:last-child tr:first-child > :first-child::before {
  content: '↻';
  left: -13px;
  position: absolute;
}
.spell .description a {
  font-style: normal;
  border-bottom: 1px dotted black;
}
.spell .description ul,
.spell .description ol {
  margin: 0.25lh 0;
  display: flex;
  flex-direction: column;
  gap: 0.25lh;
  padding-left: 0;
  list-style-position: inside;
}
.spell .description ul li,
.spell .description ol li {
  text-align: justify;
}
.spell .description ol {
  gap: 0.15lh;
}
.spell .description ul:only-child {
  margin: 0;
}
.spell .description ol:first-child {
  counter-reset: list-item calc( var(--counter) - 1);
}
.spell .description ol {
  list-style-position: outside;
  margin-left: calc( var(--pixels-per-mm) * 3.5px );
}
.spell .description ol li.continuation {
  list-style-position: inside;
}
.spell .description ul {
  list-style-type: '🞙\2007';
}
.spell .description p {
  text-indent: calc( var(--pixels-per-mm) * 3.5px );
  text-align: var(--card-description-text-align);
  position: relative;
  margin: 0;
  display: block;
}
.spell .description table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5em 0;
}
.spell .description table:has( td[colspan] ) {
  height: calc(100% - 1em);
}
.spell .description table.indexed {
  counter-reset: indexed-table 0;
}
.spell .description table.indexed tr:has(>td) {
  counter-increment: indexed-table;
}
.spell .description table.indexed td:not(:empty) {
  position: relative;
  text-align: center;
  padding-left: 0.65em;
  padding-right: 0.65em;
}
.spell .description table.indexed td:not(:empty)::after {
  content: counter(indexed-table);
  position: absolute;
  right: 4px;
  bottom: 0;
  font-weight: bold;
  font-size: 1.2em;
  opacity: 0.33;
}
.spell .description table td,
.spell .description table th {
  border: 1px solid black;
  padding: 0.1em 0.25em;
  text-align: center;
  width: 25%;
}
.spell .description table th,
.spell .description table td[colspan] {
  text-align: center;
  font-weight: bold;
}
.spell .description table:has( > tbody > tr > td:nth-child(2):last-child).reversed td:last-child {
  text-align: left;
  width: 65%;
}
.spell .description table:has( > tbody > tr > td:nth-child(2):last-child).reversed.condensed th:first-child,
.spell .description table:has( > tbody > tr > td:nth-child(2):last-child).reversed.condensed td:first-child {
  width: 15%;
}
.spell .description table:has( > tbody > tr > td:nth-child(2):last-child):not(.reversed) td:first-child {
  text-align: left;
  width: 65%;
}
.spell .description table:has( > tbody > tr > td:nth-child(3):last-child) td {
  width: 33%;
}
.spell .description table:not([class]):has( > tbody > tr > td:nth-child(3):last-child) td {
  text-align: left;
}
.spell .description .paged_in_out_marker {
  font-family: 'Alice', serif;
}
.spell .description .paged_in_out_marker::before {
  content: '\2192';
}
.spell .description > .paged_in_out_marker:last-child {
  position: absolute;
  right: calc( var(--pixels-per-mm) * 3.5px );
  bottom: 0;
}
.spell .extras {
  flex: 0 0 calc( var(--footer-height) + var(--decoration-margin) );
  background: black;
  z-index: 30;
  margin-top: auto;
}
.spell .spell_params {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-left: auto;
  margin-right: auto;
  gap: calc( var(--pixels-per-mm) * 2px ) calc( var(--pixels-per-mm) * 1px );
  width: 100%;
  align-self: center;
  color: white;
  margin: calc( var(--pixels-per-mm) * 2px ) 0;
  padding: 0 calc( var(--bg-size) + var(--decoration-margin) + var(--pixels-per-mm) * 2.5px );
  font-family: Alice;
}
.spell .spell_params > * {
  display: flex;
  align-items: center;
  font-size: calc( var(--pixels-per-mm) * 2.2px );
  line-height: normal;
  overflow: hidden;
  filter: drop-shadow(0 0 16px black) drop-shadow(0 0 16px black) drop-shadow(0 0 16px black) drop-shadow(0 0 16px black);
}
.spell .spell_params > * > img {
  width: calc( var(--pixels-per-mm) * 5px );
  margin-right: 25px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
.spell .spell_params > * > img:last-child {
  margin-right: 0;
  object-position: right;
  object-fit: contain;
}
.spell .spell_params > * > span + img {
  margin-right: 0;
  margin-left: 25px;
}
.spell .spell_params > * > span ~ img {
  transform: scale(-1, 1);
}
.spell .spell_params > * > span {
  line-height: 1.2em;
}
.spell .spell_params > * > span:has( +img ) {
  text-align: center;
  flex: 1 0 0;
}
.spell .spell_params > *.overflows[data-fixed="true"] > span {
  line-height: 0.9;
}
.spell .spell_params > *[data-large="true"][data-fixed="true"] {
  grid-column: 1 / 3;
  font-size: 1.3em;
  text-align: justify;
}
.spell .spell_params > *[data-large="true"][data-fixed="true"] > span {
  line-height: 1.3em;
}
.spell .spell_params > *[data-large="true"][data-fixed="true"] ~ .saving_throw.adjusted:last-child:nth-child(2n + 1) {
  grid-column: auto;
}
.spell .spell_params > *[data-large="true"][data-fixed="true"] ~ .materials.adjusted:last-child:nth-child( 2n ),
.spell .spell_params > *[data-large="true"][data-fixed="true"] ~ .effect:nth-child( 2n ):last-child {
  grid-column: 1 / 3;
}
.spell .spell_params > *.shrinked {
  font-size: calc( var(--pixels-per-mm) * 2px );
}
.spell .spell_params > *.extended {
  grid-column: 1 / 3;
}
.spell .spell_params > *.extended ~ .materials {
  grid-column: 1 / 3;
  font-size: reset;
}
.spell .spell_params > *.materials span {
  text-align: left;
}
.spell .spell_params > *.aoe_cylinder {
  font-size: calc( var(--pixels-per-mm) * 2.1px );
}
.spell .spell_params > *.hyphened > span {
  hyphens: auto;
}
.spell .spell_params > *.materials span > span {
  text-transform: uppercase;
  font-size: 1.4em;
}
.spell .spell_params > *.saving_throw.adjusted:last-child:nth-child(2n + 1),
.spell .spell_params > *.materials.adjusted:last-child:nth-child(2n + 1) {
  grid-column: 1 / 3;
}
.spell.back .spell_params img {
  filter: invert(100%);
}
.spell .adds {
  position: absolute;
  right: calc( 25px  + var(--decoration-margin) / 2 );
  bottom: calc( 12px + var(--decoration-margin) / 2);
  display: flex;
  z-index: 40;
}
.spell .adds > * {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 5px 10px;
}
.spell .adds > *:not(:last-child) {
  margin-right: 20px;
}
.spell .adds > :empty {
  display: none;
}
.spell .classes {
  display: flex;
  height: calc( 120px + 1px * var(--card-bleed, 0) * var(--pixels-per-mm) + var(--decoration-margin) / 2);
  margin-left: 15px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc( -1px * var(--card-bleed, 0) * var(--pixels-per-mm) );
  z-index: 600;
  left: 0px;
}
.spell .classes > * {
  width: 50px;
  background: black;
  border: 2px solid gray;
  border-bottom: none;
  position: relative;
  margin: 0 2px;
  border-radius: 10px 10px 0 0 ;
  padding-bottom: calc(var(--decoration-margin) / 2 + 1px * var(--card-bleed, 0) * var(--pixels-per-mm));
  display: flex;
  align-items: center;
  justify-content: center;
}
.spell .classes > * img {
  width: 90%;
  filter: invert(100%);
}
.spell[data-alias="augury"] .description table td,
.spell[data-alias="augury"] .description table th {
  width: 50%;
  text-align: left;
}
.spell.back .description .bg.bg {
  position: absolute;
  inset: 0;
  z-index: -5;
  background: url("/assets/grimoire/images/bg_paper_full.jpg");
  filter: saturate( var(--c-text-bg-saturation, 1) ) brightness( var(--c-text-bg-brightness, 1) ) hue-rotate( calc(var(--c-text-bg-hue, 1) * 1deg) );
}
.spell .decoration {
  z-index: 25;
  position: absolute;
  display: flex;
  --bg-element-corner-margin: 50px;
  inset: var(--decoration-margin);
  inset: 0;
  border: var(--decoration-margin) black solid;
  box-sizing: content-box;
  height: calc(100% - var(--footer-height) - var(--decoration-margin) * 2);
}
.spell .decoration .before {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--bg-element-corner-margin);
  bottom: var(--bg-element-corner-margin);
}
.spell .decoration .before .before,
.spell .decoration .before .after {
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-repeat: no-repeat round;
  background-size: calc( var(--bg-size) * 2 ) auto;
}
.spell .decoration .before .before {
  background-position: calc( -1 * var(--bg-size) ) 0;
}
.spell .decoration .before .after {
  background-position: calc( 100% + var(--bg-size) ) 0;
}
.spell .decoration .after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--bg-element-corner-margin);
  right: var(--bg-element-corner-margin);
}
.spell .decoration .after .before,
.spell .decoration .after .after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bgr);
  background-repeat: round no-repeat;
  background-size: auto calc( var(--bg-size) * 2 );
}
.spell .decoration .after .before {
  background-position: 0 calc( -1 * var(--bg-size) );
}
.spell .decoration .after .after {
  background-position: 0 calc( 100% + var(--bg-size) );
}
.spell .decoration .ct,
.spell .decoration .cb {
  position: absolute;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.spell .decoration .ct .before,
.spell .decoration .cb .before,
.spell .decoration .ct .after,
.spell .decoration .cb .after {
  position: absolute;
  inset: 0;
  background: var(--bgc) no-repeat left top;
}
.spell .decoration .ct .after,
.spell .decoration .cb .after {
  transform: rotate(90deg);
}
.spell .decoration .cb {
  bottom: 0;
  transform: rotate(180deg);
}
.spell.back .decoration:has( ~ .description ) > .before {
  bottom: calc( var(--description-height) + var(--bg-size) );
}
.spell.back .decoration:has( ~ .description ) .tail {
  --bg-filler-color: black;
  position: absolute;
  left: 0;
  right: 0;
  top: calc( 100% - var(--description-height) - var(--bg-size) );
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.55);
  background: linear-gradient(to right, var(--bg-filler-color), var(--bg-filler-color)), var(--bgci), var(--bgci);
  background-repeat: no-repeat;
  background-size: calc( 100% - 100px) 12px, auto auto, auto auto;
  background-position: center calc( 25px - 6px ), -50px top, right -50px top;
}
.spell.back .decoration:has( ~ .description ) .tail .after {
  position: absolute;
  top: 0;
  height: calc( var(--bg-size) * 2 );
  left: calc( var(--bg-size) * 2 );
  right: calc( var(--bg-size) * 2 );
  background-image: var(--bgr);
  background-repeat: round no-repeat;
}
.spell.back .decoration:has( ~ .description ) .tail .before {
  position: absolute;
  left: 0;
  right: 0;
  background-image: var(--bg), var(--bg);
  background-position: calc( -1 * var(--bg-size) ) 0, calc( 100% + var(--bg-size) ) 0;
  background-repeat: no-repeat round;
  top: var(--bg-element-corner-margin);
  bottom: var(--bg-element-corner-margin);
}
.spell.back .description {
  z-index: 1;
  height: var(--description-height);
}
.spell.abjuration {
  --color-hsl-h: 270;
  --sigil: url('/assets/grimoire/images/abjuration/sigil.png');
}
.spell.abjuration .decoration {
  --bg: url('/assets/grimoire/images/abjuration/frame_element.svg');
  --bgr: url('/assets/grimoire/images/abjuration/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/abjuration/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/abjuration/frame_corner_intermedia.svg');
}
.spell.abjuration .delimiter {
  background-image: url('/assets/grimoire/images/abjuration/delimiter.svg');
}
.spell.abjuration.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/abjuration/noise.png");
  background-position: 90% 65%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.abjuration {
  --sigil: url('/assets/grimoire/images/abjuration/sigil.png');
}
.spell.conjuration {
  --color-hsl-h: 225;
  --sigil: url('/assets/grimoire/images/conjuration/sigil.png');
}
.spell.conjuration .decoration {
  --bg: url('/assets/grimoire/images/conjuration/frame_element.svg');
  --bgr: url('/assets/grimoire/images/conjuration/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/conjuration/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/conjuration/frame_corner_intermedia.svg');
}
.spell.conjuration .delimiter {
  background-image: url('/assets/grimoire/images/conjuration/delimiter.svg');
}
.spell.conjuration.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/conjuration/noise.png");
  background-position: 11% 82%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.conjuration {
  --sigil: url('/assets/grimoire/images/conjuration/sigil.png');
}
.spell.divination {
  --color-hsl-h: 45;
  --sigil: url('/assets/grimoire/images/divination/sigil.png');
}
.spell.divination .decoration {
  --bg: url('/assets/grimoire/images/divination/frame_element.svg');
  --bgr: url('/assets/grimoire/images/divination/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/divination/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/divination/frame_corner_intermedia.svg');
}
.spell.divination .delimiter {
  background-image: url('/assets/grimoire/images/divination/delimiter.svg');
}
.spell.divination.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/divination/noise.png");
  background-position: 52% 60%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.divination {
  --sigil: url('/assets/grimoire/images/divination/sigil.png');
}
.spell.enchantment {
  --color-hsl-h: 315;
  --sigil: url('/assets/grimoire/images/enchantment/sigil.png');
}
.spell.enchantment .decoration {
  --bg: url('/assets/grimoire/images/enchantment/frame_element.svg');
  --bgr: url('/assets/grimoire/images/enchantment/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/enchantment/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/enchantment/frame_corner_intermedia.svg');
}
.spell.enchantment .delimiter {
  background-image: url('/assets/grimoire/images/enchantment/delimiter.svg');
}
.spell.enchantment.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/enchantment/noise.png");
  background-position: 64% 58%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.enchantment {
  --sigil: url('/assets/grimoire/images/enchantment/sigil.png');
}
.spell.evocation {
  --color-hsl-h: 0;
  --sigil: url('/assets/grimoire/images/evocation/sigil.png');
}
.spell.evocation .decoration {
  --bg: url('/assets/grimoire/images/evocation/frame_element.svg');
  --bgr: url('/assets/grimoire/images/evocation/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/evocation/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/evocation/frame_corner_intermedia.svg');
}
.spell.evocation .delimiter {
  background-image: url('/assets/grimoire/images/evocation/delimiter.svg');
}
.spell.evocation.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/evocation/noise.png");
  background-position: 57% 51%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.evocation {
  --sigil: url('/assets/grimoire/images/evocation/sigil.png');
}
.spell.illusion {
  --color-hsl-h: 180;
  --sigil: url('/assets/grimoire/images/illusion/sigil.png');
}
.spell.illusion .decoration {
  --bg: url('/assets/grimoire/images/illusion/frame_element.svg');
  --bgr: url('/assets/grimoire/images/illusion/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/illusion/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/illusion/frame_corner_intermedia.svg');
}
.spell.illusion .delimiter {
  background-image: url('/assets/grimoire/images/illusion/delimiter.svg');
}
.spell.illusion.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/illusion/noise.png");
  background-position: 73% 7%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.illusion {
  --sigil: url('/assets/grimoire/images/illusion/sigil.png');
}
.spell.necromancy {
  --color-hsl-h: 135;
  --sigil: url('/assets/grimoire/images/necromancy/sigil.png');
}
.spell.necromancy .decoration {
  --bg: url('/assets/grimoire/images/necromancy/frame_element.svg');
  --bgr: url('/assets/grimoire/images/necromancy/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/necromancy/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/necromancy/frame_corner_intermedia.svg');
}
.spell.necromancy .delimiter {
  background-image: url('/assets/grimoire/images/necromancy/delimiter.svg');
}
.spell.necromancy.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/necromancy/noise.png");
  background-position: 72% 90%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.necromancy {
  --sigil: url('/assets/grimoire/images/necromancy/sigil.png');
}
.spell.transmutation {
  --color-hsl-h: 90;
  --sigil: url('/assets/grimoire/images/transmutation/sigil.png');
}
.spell.transmutation .decoration {
  --bg: url('/assets/grimoire/images/transmutation/frame_element.svg');
  --bgr: url('/assets/grimoire/images/transmutation/frame_element_rotated.svg');
  --bgc: url('/assets/grimoire/images/transmutation/frame_corner.svg');
  --bgci: url('/assets/grimoire/images/transmutation/frame_corner_intermedia.svg');
}
.spell.transmutation .delimiter {
  background-image: url('/assets/grimoire/images/transmutation/delimiter.svg');
}
.spell.transmutation.back .bg {
  position: absolute;
  inset: 0;
  z-index: -10;
  background-image: url("/assets/grimoire/images/transmutation/noise.png");
  background-position: 87% 3%;
  filter: saturate( var(--c-back-saturation, 1) ) brightness( var(--c-back-brightness, 1) ) hue-rotate( calc(var(--c-back-hue, 1) * 1deg) );
}
.box .school.transmutation {
  --sigil: url('/assets/grimoire/images/transmutation/sigil.png');
}
.spell.enchantment.back .decoration:has( ~ .description ) .tail {
  --bg-filler-color: transparent;
}
.spell.illusion.back .decoration:has( ~ .description ) > .before {
  bottom: var(--bg-element-corner-margin);
}
.spell.illusion.back .decoration:has( ~ .description ) > .tail > .before {
  display: none;
}
.spell.illusion.back .decoration:has( ~ .description ) > .tail > .after {
  background-size: 100% 100%;
}
.spell.abjuration .sigil {
  background-size: 57%;
}
.DEV {
  position: absolute;
  top: 0;
  left: 100%;
  background: white;
  font-size: 1.8rem;
  padding: 20px;
  z-index: 8000;
  display: none;
  border-radius: 0 10px 10px 0;
  border: 1px solid black;
}
.DEV > * {
  display: block;
  white-space: nowrap;
}
header:hover ~ .DEV,
.DEV:hover {
  display: block;
}
.DEV label {
  display: flex;
  cursor: pointer;
  align-items: center;
}
.DEV label input {
  margin-right: 10px;
}
.DEV label:hover {
  background: lightblue;
}
.spell:hover {
  z-index: 90;
}
.spell:nth-of-type(3n) .DEV {
  left: auto;
  right: 100%;
  border-radius: 10px 0 0 10px;
}
