/* Survivor's Journal scrapbook finish. Loaded after the structural stylesheet. */
.content {
    margin-top: -10px;
	padding: 28px max(38px, calc((100vw - 1220px)/2)) 90px;
	gap: 5px;
	background-color: #e8dac0;
	background-image: radial-gradient(ellipse at 3% 16%, #815c3430, transparent 17%), radial-gradient(ellipse at 98% 70%, #815c3429, transparent 20%), repeating-linear-gradient(10deg, #fff0 0 9px, #7252310b 10px, #fff0 11px 22px), linear-gradient(#856d4515 1px, transparent 1px), linear-gradient(90deg, #856d4511 1px, transparent 1px);
	background-size: auto, auto, auto, 84px 84px, 84px 84px
}

.card {
	position: relative;
	min-height: 300px;
	padding: 38px 46px;
	background: none;
	border: 0;
	box-shadow: none;
	overflow: visible
}

.card:before {
	content: "";
	position: absolute;
	inset: 0px 0px;
	z-index: 0;
	background: var(--card-skin) center / 100% 100% no-repeat;
	clip-path: none;
	filter: drop-shadow(0 5px 5px #46341f48);
	pointer-events: none;
}

.card:after {
	display: none
}

.card h2 {
	position: relative
}

.card h2:after {
	content: "";
	display: block;
	width: 92px;
	height: 1px;
	margin-top: 13px;
	background: #9a805b
}

.card h2,
.card .rich,
.card p,
.card .content-image {
	position: relative;
	z-index: 1;
}

.card .rich hr {
	border: 0;
	border-top: 1px dashed #9d8d72;
	margin: 14px 0
}

.card .rich b {
	color: #9b4f2e
}

.card[data-block="welcome"] {
	padding-left: 50px
}

.card[data-block="notes"] {
	padding-left: 50px
}

.card.image {
	padding: 17px 20px 25px;
	margin: 20px;
}

.card.image .content-image {
	height: 245px;
	border: 9px solid #f8edda;
}

.card.image h2 {
	font-family: "Comic Sans MS", cursive;
	font-size: 27px;
	text-align: center;
	margin: 10px 0 0
}

.card.image h2:after {
	display: none
}

.card[data-block="map"] .content-image {
    padding: 10px;
	height: 100%;
	border: 0
}

.card[data-block="map"] h2 {
	position: absolute;
	z-index: 2;
	right: 34px;
	top: 25px;
	padding: 7px 20px;
	background: #d9bb87;
	transform: rotate(3deg);
	font-size: 19px
}

.decoration {
	position: absolute;
	width: 140px;
	max-height: 220px;
	object-fit: contain;
	transform-origin: center;
	z-index: 100;
}

.decoration[src*="tape"] {
	width: 115px
}

.editing .decoration {
	pointer-events: auto;
	cursor: grab;
	touch-action: none;
	outline: 2px dashed #b94f2c;
	outline-offset: 5px;
	background: #fff5
}

.editing .decoration.selected {
	outline: 3px solid #e14e24;
	outline-offset: 7px;
	filter: drop-shadow(0 0 7px white) drop-shadow(0 4px 4px #0005)
}

.decor-control {
	display: grid;
	grid-template-columns: 58px 1fr;
	gap: 9px;
	align-items: center;
	padding: 10px;
	background: #eee4d2;
	border: 1px solid #d0c0a5
}

.decor-control>img {
	width: 58px;
	height: 52px;
	object-fit: contain;
	background: #d9ccb6
}

.decor-control .fields {
	display: grid;
	gap: 6px
}

.decor-control .fields label {
	grid-template-columns: 62px 1fr;
	align-items: center
}

.decor-control .fields input {
	padding: 4px
}

.decor-control button {
	padding: 6px
}

.tabs {
	background: linear-gradient(transparent 20px, #d8c6a4 20px)
}

.tabs button {
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--tab-skin) center bottom/100% 100% no-repeat !important;
	box-shadow: none !important;
	color: #302b20 !important;
	padding-top: 8px;
	padding-bottom: 10px;
}

.tabs button.active {
	background-image: var(--active-tab-skin) !important;
	color: #fff5e7 !important
}

.admin-tab {
	width: 100px;
	height: 190px;
	padding: 18px 16px;
	border: 0;
	border-radius: 0;
	background: var(--admin-tab-skin) center/100% 100% no-repeat;
	color: #fff4e3;
	box-shadow: none;
	text-shadow: 0 1px 2px #4b210f;
	margin-right: -35px;
	font-size: 20px;
}

@media(max-width:800px) {
	.card {
		padding: 38px 30px
	}

	.content {
		gap: 5px
	}
}

/* One physical boundary: hero behind tabs, tabs tucked beneath the page edge. */
.hero {
	height: 430px
}

.tabs {
	height: 92px;
	margin-top: -92px;
	position: relative;
	z-index: 5;
	align-items: flex-end;
	background: transparent !important;
	padding-bottom: 0;

	/* Allow sideways scrolling only */
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-y: none;
	scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
	display: none;
}

.tabs button {
	height: 86px;
	transform: translateY(14px);
}

.content {
	position: relative;
	z-index: 6;
	isolation: isolate;
	background: transparent !important;
	padding-top: 44px;
	min-height: calc(100vh - 430px)
}

.content:before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	right: auto;
	top: -12px;
	bottom: 0;
	width: 100vw;
	transform: translateX(-50%);
	background: var(--content-skin) center/100% 100% no-repeat;
	pointer-events: none
}

.admin-tab {
	position: absolute;
	z-index: 8;
	top: 25px;
	right: -5px;
	transform: none
}

/* Transparent widgets and editor UI over replaceable paper skins. */
.weather {
	isolation: isolate;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	transform: rotate(-1.4deg);
	padding: 34px 23px 20px;

	top: auto;
	bottom: -5px;
	right: 3.2vw;
	z-index: 9;
}

.weather:after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -12px;
	background: var(--weather-skin) center/100% 100% no-repeat;
	filter: drop-shadow(0 5px 5px #1c160e66)
}

.weather:before {
	z-index: 2
}

.admin-panel {
	isolation: isolate;
	position: fixed;
	top: 55px;
	right: 0;
	bottom: 65px;
	width: min(470px, 100vw);
	height: auto;
	box-sizing: border-box;

	display: flex;
flex-direction: column;
overflow: hidden;

	background: transparent !important;
	box-shadow: none !important;
	padding: 42px 40px 50px;
}

.admin-panel:before {
	content: "";
	position: fixed;
	z-index: 0;
	top: 18px;
	right: 0;
	bottom: 18px;
	width: min(470px, 100vw);
	background: var(--panel-skin) center / 100% 100% no-repeat;
	filter: drop-shadow(-8px 0 16px #0005);
	pointer-events: none;
}

.admin-panel > * {
	position: relative;
	z-index: 1;
}

.admin-panel > header,
.admin-panel .panel-nav,
.admin-panel .panel-section {
	background: transparent !important;
}

/* Site Controls title and X button */
.admin-panel > header {
	position: relative;
	flex: 0 0 auto;
	z-index: 2;
	padding: 0 4px 18px;
}

/* Editor fills the space below the header */
.admin-panel #editor:not(.hidden) {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

/* Admin navigation does not scroll */
.admin-panel .panel-nav {
	position: relative;
	flex: 0 0 auto;
	z-index: 2;
	margin: 0;
	padding: 0 4px;
	overflow-x: auto;
	overflow-y: hidden;
	margin-bottom: 5px;
}

/* Only the settings below the navigation scroll */
.admin-panel #panel-content {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	z-index: 1;
	margin: 0;
	padding: 0 4px 28px;
	overflow-x: hidden;
	overflow-y: auto;
}

/* Remove the gap above the first heading */
.admin-panel #panel-content > :first-child {
	margin-top: 0;
}

/* Allow the login form to scroll separately when necessary */
.admin-panel #login-form {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

.admin-panel .save,
.admin-panel .secondary {
	margin-left: 4px;
	margin-right: 4px;
	width: calc(100% - 8px)
}

@media(max-width:800px) {
	.hero {
		height: 390px
	}

	.tabs {
	margin-top: -92px;
}

	.admin-tab {
		top: 378px
	}

	.content:before {
		top: -12px
	}

	.content {
		min-height: calc(100vh - 390px)
	}
}

html,
body {
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}

.content {
	width: 100%;
	max-width: 100%;
}

.decor-item {
	position: absolute;
	z-index: 100;
	width: max-content;
	transform:
		translate(-50%, -50%)
		rotate(var(--rotate))
		scale(var(--scale));
	transform-origin: center;
	pointer-events: none;
	touch-action: none;
}

.decor-item .decoration {
	position: relative;
	display: block;
	transform: none;
	pointer-events: none;
	outline: none;
	background: transparent;
	user-select: none;
	-webkit-user-drag: none;
}

.decor-handles {
	display: none;
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.editing .decor-item {
	pointer-events: auto;
	cursor: grab;
}

.editing .decor-item.selected .decoration {
	outline: 2px dashed #e14e24;
	outline-offset: 5px;
	filter:
		drop-shadow(0 0 7px white)
		drop-shadow(0 4px 4px #0005);
}

.editing .decor-item.selected .decor-handles {
	display: block;
}

.decor-handles button {
	position: absolute;
	z-index: 2;
	width: 30px;
	height: 30px;
	padding: 0;
	display: grid;
	place-items: center;
	border: 2px solid #fff4df;
	border-radius: 50%;
	background: #9b4f2e;
	color: white;
	font: bold 18px/1 Arial;
	box-shadow: 0 2px 5px #0006;
	cursor: pointer;
	pointer-events: auto;
	touch-action: none;
}

.decor-delete {
	top: -20px;
	right: -20px;
}

.decor-rotate {
	top: -44px;
	left: calc(50% - 15px);
	cursor: grab !important;
}

.decor-resize {
	right: -20px;
	bottom: -20px;
	cursor: nwse-resize !important;
}

.admin-panel .panel-section {
	position: relative;
	z-index: 1;
}

.weather div.day-phase {
	display: block;
	text-align: center;
}

.weather div.day-phase b {
	display: block;
	width: 100%;
	text-align: center;
}

.rich-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	padding: 5px;
	border: 1px solid #a99572;
	border-bottom: 0;
}

.rich-toolbar button {
	min-width: 32px;
	padding: 6px 8px;
	cursor: pointer;
}

.rich-editor {
	min-height: 150px;
	max-height: 320px;
	padding: 12px;
	overflow-y: auto;
	border: 1px solid #a99572;
	background: #fffaf0;
	color: #29281f;
	font: 16px/1.5 Arial, sans-serif;
}

.rich-editor:focus {
	outline: 2px solid #9b4f2e;
	outline-offset: -2px;
}

.rich-editor p:first-child {
	margin-top: 0;
}

.rich-editor p:last-child {
	margin-bottom: 0;
}

.rich-editor a {
	color: #9b4f2e;
	text-decoration: underline;
}