:root {
	--rawhide: #513229;
	--bone: #f4f1e2;
	--moon: #d8ebf9;
	--tumbleweed: #d7d4b1;
	--ok: #3d6b4f;
	--error: #8b3a2a;
	--radius: 18px;
	--shadow: 0 8px 24px rgba(81, 50, 41, 0.08);
	--font: "Outfit", "Segoe UI", system-ui, sans-serif;
	--script: "Caveat", "Segoe Script", cursive;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--bone);
	color: var(--rawhide);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}

.rs-body {
	min-height: 100vh;
	min-height: 100dvh;
}

.rs-app {
	width: min(34rem, 100%);
	margin: 0 auto;
	padding: 0 1.15rem 2.5rem;
	padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
}

.rs-body-admin .rs-app {
	width: min(40rem, 100%);
}

.rs-main {
	padding-top: 0.4rem;
}

.rs-top {
	display: grid;
	grid-template-columns: 2.75rem 1fr 2.75rem;
	align-items: center;
	padding: 0.85rem 0 0.4rem;
}

.rs-brand-mini {
	text-align: center;
}

.rs-brand-name {
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-size: 0.78rem;
}

.rs-brand-name-lg {
	font-size: 1.35rem;
	letter-spacing: 0.28em;
	margin: 0.35rem 0 0;
}

.rs-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--rawhide);
	text-decoration: none;
	cursor: pointer;
}

.rs-icon-btn-ghost {
	visibility: hidden;
}

.rs-icon {
	width: 1.45rem;
	height: 1.45rem;
	display: block;
}

.rs-icon-logo {
	width: 5.5rem;
	height: 6.8rem;
	color: var(--rawhide);
}

.rs-icon-footer-horse {
	width: 7.5rem;
	height: 3.2rem;
	opacity: 0.9;
}

.rs-drawer {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	background: #fff;
	border-radius: var(--radius);
	padding: 0.7rem;
	margin-bottom: 1rem;
	box-shadow: var(--shadow);
}

.rs-drawer a {
	display: block;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	color: var(--rawhide);
	text-decoration: none;
	font-weight: 600;
	background: var(--tumbleweed);
}

.rs-h1 {
	font-size: 1.85rem;
	line-height: 1.15;
	margin: 0.4rem 0 1rem;
	font-weight: 700;
}

.rs-h1-question {
	text-align: center;
	font-size: 1.7rem;
	margin: 1.2rem 0 1.4rem;
}

.rs-h1-day {
	text-align: center;
	letter-spacing: 0.06em;
	margin-bottom: 0.2rem;
}

.rs-h2 {
	font-size: 1.05rem;
	margin: 1.4rem 0 0.6rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rs-updated {
	text-align: center;
	margin: 0 0 1rem;
	font-size: 0.92rem;
	opacity: 0.8;
}

.rs-script {
	font-family: var(--script);
	font-size: 1.55rem;
	font-weight: 500;
	margin: 0.15rem 0 0;
	text-align: center;
}

.rs-welcome {
	font-size: 1.55rem;
	text-align: center;
	font-weight: 600;
	margin: 2.2rem 0 1.3rem;
}

.rs-welcome span {
	display: block;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 1.2rem;
	margin-top: 0.15rem;
}

.rs-login {
	padding-top: 2.4rem;
	text-align: center;
}

.rs-login-mark {
	display: flex;
	justify-content: center;
	margin-bottom: 0.4rem;
}

.rs-form {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	text-align: left;
}

.rs-label {
	font-size: 0.92rem;
	font-weight: 600;
	margin-top: 0.3rem;
}

.rs-input,
.rs-textarea,
.rs-select {
	width: 100%;
	min-height: 3.15rem;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: var(--rawhide);
	font: inherit;
	font-size: 16px;
	padding: 0.75rem 1rem;
	box-shadow: inset 0 0 0 1px rgba(81, 50, 41, 0.08);
}

.rs-textarea {
	min-height: 7rem;
	resize: vertical;
}

.rs-password-wrap {
	position: relative;
}

.rs-password-icon {
	position: absolute;
	left: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--rawhide);
	opacity: 0.7;
}

.rs-password-icon .rs-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.rs-input-password {
	padding-left: 2.7rem;
	letter-spacing: 0.35em;
}

.rs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 3.25rem;
	padding: 0.8rem 1.2rem;
	border: 0;
	border-radius: 16px;
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	color: var(--rawhide);
}

.rs-btn-primary {
	background: var(--rawhide);
	color: var(--bone);
	width: 100%;
	margin-top: 0.4rem;
}

.rs-btn-secondary {
	background: var(--tumbleweed);
	width: 100%;
	margin-top: 0.2rem;
}

.rs-btn-small {
	width: auto;
	min-height: 2.6rem;
	padding: 0.5rem 0.9rem;
	font-size: 0.82rem;
	margin: 0;
	white-space: nowrap;
}

.rs-btn-save .rs-icon {
	width: 1.2rem;
	height: 1.2rem;
}

.rs-day-stack {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.rs-day-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.5rem;
	border-radius: 16px;
	background: var(--tumbleweed);
	color: var(--rawhide);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.04em;
}

.rs-day-btn.is-today {
	background: var(--rawhide);
	color: var(--bone);
}

.rs-day-tabs {
	display: flex;
	gap: 0.45rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 0 1.1rem;
	padding-bottom: 0.2rem;
}

.rs-tab {
	flex: 1 0 auto;
	min-height: 2.6rem;
	padding: 0.55rem 0.8rem;
	border-radius: 999px;
	background: var(--tumbleweed);
	color: var(--rawhide);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.92rem;
	text-align: center;
	white-space: nowrap;
}

.rs-tab.is-active {
	background: var(--rawhide);
	color: var(--bone);
}

.rs-note {
	background: var(--moon);
	border-radius: var(--radius);
	padding: 1rem 1.05rem 1.1rem;
	margin-bottom: 1.1rem;
}

.rs-note-empty {
	padding-bottom: 0.85rem;
}

.rs-note-kicker {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rs-note-body {
	margin: 0;
	white-space: pre-wrap;
}

.rs-note-edit {
	margin-top: 0.7rem;
}

.rs-note-edit summary,
.rs-add-rider summary {
	cursor: pointer;
	font-weight: 700;
	list-style: none;
	padding: 0.55rem 0;
}

.rs-note-edit summary::-webkit-details-marker,
.rs-add-rider summary::-webkit-details-marker {
	display: none;
}

.rs-class {
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 1rem;
	box-shadow: var(--shadow);
}

.rs-class-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	background: var(--tumbleweed);
	padding: 0.85rem 1rem;
}

.rs-class-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.rs-class-dash {
	font-weight: 500;
}

.rs-class-count {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	font-weight: 600;
	opacity: 0.8;
}

.rs-icon-person {
	width: 1.1rem;
	height: 1.1rem;
}

.rs-table {
	padding: 0.35rem 1rem 0.85rem;
}

.rs-table-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
	align-items: center;
	padding: 0.7rem 0;
	border-bottom: 1px solid rgba(81, 50, 41, 0.08);
}

.rs-table-row:last-child {
	border-bottom: 0;
}

.rs-table-head {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.65;
	padding-bottom: 0.25rem;
}

.rs-rider-name,
.rs-horse-name {
	font-weight: 600;
}

.rs-empty,
.rs-empty-row {
	opacity: 0.75;
	padding: 0.4rem 0 0.8rem;
}

.rs-add-rider {
	padding: 0 1rem 0.9rem;
}

.rs-add-rider-fields {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding-bottom: 0.4rem;
}

.rs-or {
	margin: 0.2rem 0 0;
	text-align: center;
	font-size: 0.85rem;
	opacity: 0.7;
}

.rs-save-bar {
	position: sticky;
	bottom: 0;
	padding: 0.9rem 0 calc(0.6rem + env(safe-area-inset-bottom));
	background: linear-gradient(to top, var(--bone) 70%, rgba(244, 241, 226, 0));
	z-index: 5;
}

.rs-day-foot {
	margin-top: 2rem;
	text-align: center;
	color: var(--rawhide);
}

.rs-day-foot-horse {
	display: flex;
	justify-content: center;
	margin-bottom: 0.2rem;
}

.rs-logout {
	margin: 2rem 0 0;
	text-align: center;
}

.rs-logout a {
	color: var(--rawhide);
	opacity: 0.55;
	font-size: 0.92rem;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.rs-list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	margin-bottom: 0.6rem;
}

.rs-list-head .rs-h1 {
	margin: 0;
}

.rs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.rs-list-item {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	column-gap: 0.6rem;
	background: #fff;
	border-radius: 16px;
	padding: 0.95rem 1rem;
	text-decoration: none;
	color: var(--rawhide);
	box-shadow: var(--shadow);
}

.rs-list-title {
	grid-column: 1;
	font-weight: 700;
	font-size: 1.12rem;
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.rs-list-title-icon .rs-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.rs-list-meta {
	grid-column: 1;
	font-size: 0.92rem;
	opacity: 0.78;
	margin-top: 0.15rem;
}

.rs-list-arrow {
	grid-row: 1 / span 2;
	grid-column: 2;
	align-self: center;
	font-size: 1.6rem;
	opacity: 0.35;
}

.rs-badge {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rs-badge-ok {
	color: var(--ok);
}

.rs-badge-muted {
	color: rgba(81, 50, 41, 0.55);
}

.rs-check {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 2.75rem;
	font-weight: 600;
}

.rs-check input {
	width: 1.25rem;
	height: 1.25rem;
}

.rs-hint {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.75;
}

.rs-tip {
	background: var(--moon);
	border-radius: var(--radius);
	padding: 1rem 1.05rem;
	margin: 0.4rem 0;
}

.rs-tip-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rs-url {
	word-break: break-all;
	font-weight: 600;
}

.rs-mini-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.rs-mini-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	background: #fff;
	border-radius: 12px;
	padding: 0.75rem 0.9rem;
}

.rs-link-btn {
	border: 0;
	background: none;
	color: var(--rawhide);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	padding: 0.4rem;
}

.rs-notice {
	border-radius: 14px;
	padding: 0.8rem 1rem;
	margin: 0.4rem 0 1rem;
	font-weight: 600;
}

.rs-notice-ok {
	background: #e4f0e7;
}

.rs-notice-error {
	background: #f3ddd6;
}

.rs-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (min-width: 720px) {
	.rs-h1-question {
		font-size: 2rem;
	}

	.rs-table-row {
		grid-template-columns: 1.1fr 1fr;
	}
}
