#sign-in {
	position: fixed;
	top: 8pt;
	right: 8pt;

	width: 24rem;
	max-width: 100%;

	display: flex;
	flex-direction: column;
	
	background:var(--background-color);
	z-index: 10;

	box-shadow: 0 0 0 100vmax #0004;
}
#sign-in:not(:focus):not(:focus-within){
	pointer-events: none;
	opacity: 0;
}
#sign-in .cancel {
	background: transparent;
	border: 0;
}
#sign-in > * + * {
	margin-top: 8pt;
}
#sign-in.loading{
	border-color: blue;
}
#sign-in.invalid{
	border-color: red;
}

input[disabled] {
	display: none;
}

#browser {
	flex: 1;
	scroll-behavior: smooth;
}
#browser .title{
	scroll-margin: 4rem;
	text-decoration: none;
	flex-grow: 1;
}
header {
	display: flex;
	gap: 8pt;
}
header > label:first-child {
	flex-grow: 1;
}
header > label:last-child {
	flex-basis: 4rem;
}
.group.location > header .title {
	font-size: 2rem;
}
.group.category {
	margin-top: 1rem;
}
.group.category > header {
	grid-column: 1 / -1;
}
.group.category > header .title{
	font-size: 1.5rem;
}
#browser > section {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	grid-auto-rows: auto;
	grid-gap: 8pt;
	scroll-margin-top: 1rem;
}
#browser > header {
	flex-wrap: wrap;
}
#browser > header > #search {
	width: 0;
	flex-grow: 1;
}

.card {
	border-radius: var(--radius);
	padding: 8pt;
	background: transparent;
	transition-duration: 100ms;
	border: var(--border);
	border-color: var(--border-color);
}
.card:hover:not(header) {
	border-color: var(--hover-color);
}
.card:focus,
.card:focus-within:not(header),
.card.open {
	border-color: var(--text-color);
}
.card.changed,
.card.changed:hover,
.card.changed:focus-within {
	border-color: var(--success-color);
	border-style: dashed;
}
.card.info {
	display: flex;
	flex-direction: column;
}
.card.info > :first-child {
	overflow-wrap: break-word;
	flex-grow: 1;
}
.card > .menu {
	display: flex;
	margin-top: 8pt;
	padding-top: 8pt;
	gap: 8pt;
	border-top: var(--border);
}
.card > .menu > * {
	width: 1rem;
	height: 1rem;
	padding: 0;
}
.card > .menu > .action > input {
	display: none;
}
#editor {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 36vw;
}
#editor > * {
	grid-column-end: span 2;
}
#editor > label[half-width] {
	grid-column-end: span 1;
}
#editor header > * {
	flex: 1 0 0;
	width: 0;
}
header > [type=button] {
	cursor: pointer;
	text-decoration: none;
	color:var(--text-color);
}

#editor > label > #title {
	font-size: 1.6rem;
}
#editor > label > #author {
	font-size: 1rem;
}
#editor > label > #media {
	display: flex;
	overflow-x: scroll;
}
#media > .thumb {
	cursor: move;
	margin-right: 8pt;
	flex: 0 0 10rem;
	height: 12rem;
	width: 8rem;
}
.thumb > img {
	object-fit: contain;
	object-position: center;
	max-height: 100%;
	pointer-events: none;
	height: 8rem;
}
@font-face {
	font-family: 'pt-root';
	src: url('pt-root.woff2') format('woff2');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}
.markdown {
	position: relative;
}
.markdown .bold {
	font-weight: 700;
}
.markdown .italic {
	font-style: italic;
}
.markdown .strikethrough {
	text-decoration: line-through;
}
.markdown .link {
	color: var(--link-color);
}
.markdown .list {
	background: linear-gradient(90deg, #ff08,transparent 2ch);
}
.markdown .heading {
	font-weight: 700;
	display: inline-block;
	width: 100%;
	background: #8882;
}
/* TextareaDecorator.css
 * written by Colin Kuebler 2012
 * Part of LDT, dual licensed under GPLv3 and MIT
 * Provides styles for rendering a textarea on top of a pre with scrollbars
 */
.markdown code, .markdown textarea {
	font-size: 1rem;
	font-family: inherit;
}

.markdown {
	overflow: hidden;
	position: relative;
}

.markdown > code {
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}
.markdown > textarea {
	/* hide the text but show the text caret */
	color: transparent !important;
	caret-color: var(--text-color);
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	padding: inherit;
	cursor: text;
	background: transparent;
}
label.card{
	position: relative;
	padding: 0;
	display: block;
}
label.card:hover > span{
	color: var(--hover-color);
}
label.card:focus-within > span{
	color: var(--text-color);
}
label.card.changed > span,
label.card.changed:hover > span,
label.card.changed:focus-within > span {
	color: var(--success-color);
}
label.card > span {
	position: absolute;
	top: -0.5rem;
	left: 0.3rem;
	text-transform: lowercase;
	font-size: .8rem;
	padding-inline: .2ch;
	font-weight: 700;
	background: var(--background-color);
	color: var(--border-color);
	max-width: 100%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
label.card > :last-child {
	border: 0;
	padding: 8pt;
	width: 100%;
	height: 100%;
	background: transparent;
}
label.card > * {
	margin: 0;
	border-radius: var(--radius);
}
label.card ::placeholder {
	color: #888;
}
label.card textarea{
	resize: none;
}
input::placeholder {
	color: var(--hover-color)
}
:root{
	--radius: 4pt;
	--border-color: #ccc;
	--hover-color: #888;
	--link-color: #248;
	--success-color: #2a8;
	--border: solid 2pt var(--border-color);
	--background-color: white;
	--cover: #fffd;
	--text-color: black;
}

@media (prefers-color-scheme: dark) { :root {
	--border-color: hsl(220deg,20%,20%);
	--hover-color: hsl(220deg,20%,40%);
	--link-color: #8af;
	--success-color: #8fa;
	--background-color: hsl(220deg,20%,8%);
	--cover: #000d;
	--text-color: #ddd;
} }

html {
	font-family: 'pt-root', Helvetica, Roboto, Arial, sans-serif;
	font-weight: 400;
	font-size: 14pt;
	touch-action: pan-x;
	overscroll-behavior-x: none; /* Prevent Chrome swipe navigation */
}
body {
	display: flex;
	background: var(--background-color);
}
body * {
	box-sizing: border-box;
	color: var(--text-color);
	overflow-wrap: break-word;
}
body:not(input):not(textarea){
	user-select: none;
}
body :focus{
	outline: 0;
}
h1,h2,h3,h4,h5,h6 {
	font-weight: 400;
	margin: 0;
	padding: 0;
}

button,
[type=button],
[type=submit] {
  cursor: pointer;
}

[hidden]{
	display: none !important;
}
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
========================================================================== */

/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/

html {
	line-height: 1.35; /* 1 */
	-webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
========================================================================== */

/**
* Remove the margin in all browsers.
*/

body {
	margin: 0;
}

/**
* Render the `main` element consistently in IE.
*/

main {
	display: block;
}

/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/

h1 {
	font-size: 2em;
}

/* Grouping content
========================================================================== */

/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/

hr {
	box-sizing: content-box; /* 1 */
	height: 0; /* 1 */
	overflow: visible; /* 2 */
}

/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/

pre {
	font-family: monospace, monospace; /* 1 */
	font-size: 1em; /* 2 */
}

/* Text-level semantics
========================================================================== */

/**
* Remove the gray background on active links in IE 10.
*/

a {
	background-color: transparent;
}

/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/

abbr[title] {
	border-bottom: none; /* 1 */
	text-decoration: underline; /* 2 */
	text-decoration: underline dotted; /* 2 */
}

/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/

b,
strong {
	font-weight: 700;
}

/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp {
	font-family: monospace, monospace; /* 1 */
	font-size: 1em; /* 2 */
}

/**
* Add the correct font size in all browsers.
*/

small {
	font-size: 80%;
}

/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/

sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/* Embedded content
========================================================================== */

/**
* Remove the border on images inside links in IE 10.
*/

img {
	border-style: none;
}

/* Forms
========================================================================== */

/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/

button,
input,
optgroup,
select,
textarea {
	font-family: inherit; /* 1 */
	font-size: 100%; /* 1 */
	line-height: 1.35; /* 1 */
	margin: 0; /* 2 */
}

/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/

button,
input { /* 1 */
	overflow: visible;
}

/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/

button,
select { /* 1 */
	text-transform: none;
}

/**
* Correct the inability to style clickable types in iOS and Safari.
*/

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

/**
* Remove the inner border and padding in Firefox.
*/

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

/**
* Restore the focus styles unset by the previous rule.
*/

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
	outline: 1px dotted ButtonText;
}

/**
* Correct the padding in Firefox.
*/

fieldset {
	padding: 0.35em 0.75em 0.625em;
}

/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
*    `fieldset` elements in all browsers.
*/

legend {
	box-sizing: border-box; /* 1 */
	color: inherit; /* 2 */
	display: table; /* 1 */
	max-width: 100%; /* 1 */
	padding: 0; /* 3 */
	white-space: normal; /* 1 */
}

/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/

progress {
	vertical-align: baseline;
}

/**
* Remove the default vertical scrollbar in IE 10+.
*/

textarea {
	overflow: auto;
}

/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/

[type="checkbox"],
[type="radio"] {
	box-sizing: border-box; /* 1 */
	padding: 0; /* 2 */
}

/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/

[type="search"] {
	-webkit-appearance: textfield; /* 1 */
	outline-offset: -2px; /* 2 */
}

/**
* Remove the inner padding in Chrome and Safari on macOS.
*/

[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
	-webkit-appearance: button; /* 1 */
	font: inherit; /* 2 */
}

/* Interactive
========================================================================== */

/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/

details {
	display: block;
}

/*
* Add the correct display in all browsers.
*/

summary {
	display: list-item;
}

/* Misc
========================================================================== */

/**
* Add the correct display in IE 10+.
*/

template {
	display: none;
}

/**
* Add the correct display in IE 10.
*/

[hidden] {
	display: none;
}
.panel {
	overflow: hidden scroll;
	padding: 0 1rem;
	display: grid;
	grid-gap: 1rem;
	grid-auto-rows: 1fr;
}
.panel > header {
	position: sticky;
	display: flex;
	top: 0;
	margin-inline: -1rem;
	border-inline: 0;
	border-top: 0;
	border-radius: 0;
	height: 3rem;
	gap: 0.5rem;
	z-index: 1;
	background-color: var(--background-color);
}
.panel > header > * {
	border-radius: var(--radius);
	padding: 2pt 4pt;
	z-index: -1;
}
.panel::after{
	content: '';
	display: block;
	height: 1rem;
}
html,
body,
#resize,
.panel {
	height: 100%;
}
.preview.card{
	scroll-margin-block: 4rem;
}
.preview.open.card {
	border-style: dashed;
}
.menu > .media {
	display: contents;
}
.menu > .media > img {
	width: 1rem;
	height: 1rem;
	object-fit: contain;
	background: var(--border-color);
} 
.menu > .action {
	width: 1em;
	height: 1em;	
	cursor: pointer;
}
.menu > .action > svg {
	fill: var(--hover-color);
	width: 100%;
	height: 100%;
}
.menu > .action:hover > svg {
	fill: var(--text-color);
}
.menu > .action > input:not(:checked) + svg > :nth-child(2) {
	opacity: 0;
}
#resize {
	border-radius: 0;
	padding-block: 0;
	padding-inline: 4pt;
	font-size: .6rem;
	font-weight: 700;
	border-inline-width: 0;
	cursor: col-resize;
	writing-mode: vertical-rl;
	display: flex;
	align-items: center;
	color: var(--border-color);
	touch-action: none;
	z-index: 100;
	background: var(--background-color);
}
#resize:hover {
	color: var(--hover-color);
}
#resize:focus {
	color: var(--text-color);
}
#resize:focus + #resize-ghost {
	opacity: 1;
}
#resize-ghost {
	position: fixed;
	opacity: 0;
	left: 0;
	top: 0;
	height: 100%;
	width: .6rem;
	border-right: 4pt solid var(--text-color);
	z-index: 10;
	transform: translateX(-1rem);
}
#resize > :not(.dots) {
	color: inherit;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
#resize > .dots {
	letter-spacing: 1ch;
	flex-grow: 1;
	text-align: center;
}
#resize > .author {
	transform: rotate(180deg);
}
