.orm-card {
	background: var(--orm-surface);
	backdrop-filter: blur(14px);
	border-radius: var(--orm-card-radius);
	box-shadow: var(--orm-shadow);
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.orm-card--solid {
	background: var(--orm-surface-solid);
}

.orm-card--lime {
	background: linear-gradient(160deg, rgba(182, 242, 109, 0.55), rgba(182, 242, 109, 0.15));
}

.orm-card--yellow {
	background: linear-gradient(160deg, var(--orm-yellow), #fff7c2);
	padding: 0;
	overflow: hidden;
}

.orm-card__title {
	margin: 0 0 6px;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--orm-muted);
	text-transform: none;
}

.orm-card__value {
	margin: 0;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.orm-card__meta {
	margin-top: 8px;
	font-size: 0.85rem;
	color: var(--orm-muted);
}

.orm-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(17, 17, 17, 0.08);
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 0.75rem;
	font-weight: 700;
}

.orm-badge--ok {
	background: rgba(143, 214, 58, 0.35);
	color: #245100;
}

.orm-badge--warn {
	background: rgba(245, 197, 24, 0.4);
	color: #6b5200;
}

.orm-badge--bad {
	background: rgba(248, 113, 113, 0.3);
	color: #7f1d1d;
}

.orm-span-3 { grid-column: span 3; }
.orm-span-4 { grid-column: span 4; }
.orm-span-5 { grid-column: span 5; }
.orm-span-6 { grid-column: span 6; }
.orm-span-7 { grid-column: span 7; }
.orm-span-8 { grid-column: span 8; }
.orm-span-12 { grid-column: span 12; }

.orm-cal-head {
	background: var(--orm-yellow);
	padding: 16px 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 800;
}

.orm-cal-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	padding: 14px 16px 18px;
	text-align: center;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--orm-muted);
}

.orm-cal-days span {
	padding: 10px 0;
	border-radius: 999px;
}

.orm-cal-days span.is-today {
	background: #111;
	color: #fff;
}

.orm-cal-days span.has-event {
	background: rgba(17, 17, 17, 0.08);
	color: var(--orm-ink);
}

.orm-bars {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 110px;
	margin-top: 16px;
}

.orm-bars__bar,
.orm-bars span {
	flex: 1;
	border-radius: 10px 10px 4px 4px;
	background: linear-gradient(180deg, #111, #4b5563);
	min-height: 4px;
	height: 4px;
	transform-origin: bottom;
	transition: height 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.orm-bars.is-animated .orm-bars__bar,
.orm-bars.is-animated span {
	height: var(--orm-bar-h, 4%);
}

.orm-cal-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.orm-cal-month {
	margin: 0;
	flex: 1;
	font-size: 1.25rem;
	font-weight: 800;
	text-align: center;
}

.orm-cal-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.orm-cal-pill {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: lowercase;
	background: rgba(17, 17, 17, 0.08);
}

.orm-cal-pill--training,
.orm-cal-ev--training { background: rgba(182, 242, 109, 0.55); color: #245100; }
.orm-cal-pill--match,
.orm-cal-ev--match { background: rgba(17, 17, 17, 0.85); color: #fff; }
.orm-cal-pill--tournament,
.orm-cal-ev--tournament { background: rgba(249, 115, 22, 0.85); color: #fff; }
.orm-cal-pill--event,
.orm-cal-pill--dinner,
.orm-cal-ev--event,
.orm-cal-ev--dinner { background: rgba(255, 229, 102, 0.85); color: #6b5200; }

.orm-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.orm-cal-dow {
	text-align: center;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--orm-muted);
	padding: 6px 0;
}

.orm-cal-cell {
	min-height: 92px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid rgba(17, 17, 17, 0.06);
	padding: 6px;
	box-sizing: border-box;
}

.orm-cal-cell.is-empty {
	background: transparent;
	border-color: transparent;
}

.orm-cal-cell.is-today {
	box-shadow: inset 0 0 0 2px #111;
}

.orm-cal-cell.is-clickable {
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.orm-cal-cell.is-clickable:hover {
	background: rgba(182, 242, 109, 0.22);
	box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.12);
}

.orm-cal-cell__num {
	font-size: 0.8rem;
	font-weight: 800;
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
}

.orm-cal-cell__add {
	opacity: 0;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #111;
	color: #fff;
	font-size: 12px;
	line-height: 18px;
	text-align: center;
	font-weight: 700;
}

.orm-cal-cell.is-clickable:hover .orm-cal-cell__add {
	opacity: 1;
}

.orm-cal-cell__events {
	display: grid;
	gap: 3px;
}

.orm-cal-ev {
	display: block;
	width: 100%;
	border: 0;
	text-align: left;
	cursor: default;
	border-radius: 8px;
	padding: 2px 5px;
	font-size: 0.68rem;
	font-weight: 700;
	font-family: inherit;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

button.orm-cal-ev {
	cursor: pointer;
}

button.orm-cal-ev:hover {
	filter: brightness(0.95);
	transform: translateY(-1px);
}

.orm-cal-ev em {
	font-style: normal;
	opacity: 0.85;
}

.orm-cal-more {
	font-size: 0.68rem;
	font-weight: 700;
	color: var(--orm-muted);
}

.orm-cal-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.orm-cal-tabs a {
	text-decoration: none;
	color: var(--orm-ink);
	background: rgba(17, 17, 17, 0.06);
	border-radius: 999px;
	padding: 8px 14px;
	font-weight: 700;
	font-size: 0.85rem;
}

.orm-cal-tabs a.is-active {
	background: var(--orm-lime);
}

.orm-cal-detail-list {
	max-height: 520px;
	overflow: auto;
}

.orm-sheet {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.orm-sheet[hidden] {
	display: none !important;
}

.orm-sheet__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(15, 23, 42, 0.45);
	cursor: pointer;
}

.orm-sheet__panel {
	position: relative;
	z-index: 1;
	width: min(480px, 100%);
	max-height: min(80vh, 520px);
	overflow: auto;
	background: var(--orm-surface-solid, #fff);
	border-radius: 24px 24px 0 0;
	box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
	padding: 18px 18px 28px;
	animation: orm-sheet-up 0.22s ease-out;
}

.orm-sheet__panel--tall {
	max-height: min(90vh, 720px);
}

.orm-create-types {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	margin: 12px 0 16px;
}

.orm-create-type {
	border: 0;
	cursor: pointer;
	border-radius: 12px;
	padding: 10px 6px;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	background: rgba(17, 17, 17, 0.06);
	color: var(--orm-ink);
}

.orm-create-type.is-active {
	background: var(--orm-lime);
	color: #111;
}

.orm-create-form[hidden] {
	display: none !important;
}

.orm-medical-preview {
	margin-top: 12px;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid rgba(17, 17, 17, 0.08);
	background: #f8fafc;
	min-height: 360px;
}

.orm-medical-preview__frame {
	display: block;
	width: 100%;
	height: 520px;
	border: 0;
}

.orm-medical-preview__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: contain;
}

@keyframes orm-sheet-up {
	from { transform: translateY(24px); opacity: 0.6; }
	to { transform: translateY(0); opacity: 1; }
}

.orm-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.orm-sheet__head .orm-card__title {
	margin: 0;
	font-size: 1.05rem;
	color: var(--orm-ink);
}

.orm-sheet__meta,
.orm-sheet__place {
	margin: 0 0 4px;
	color: var(--orm-muted);
	font-size: 0.9rem;
}

body.orm-sheet-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.orm-cal-cell {
		min-height: 64px;
	}
	.orm-cal-ev {
		font-size: 0.6rem;
	}
}

.orm-line {
	height: 70px;
	margin-top: 12px;
	border-radius: 12px;
	background:
		linear-gradient(180deg, transparent 48%, rgba(17,17,17,.08) 50%, transparent 52%),
		radial-gradient(circle at 20% 60%, #111 3px, transparent 4px),
		radial-gradient(circle at 45% 30%, #111 3px, transparent 4px),
		radial-gradient(circle at 70% 45%, #111 3px, transparent 4px),
		radial-gradient(circle at 90% 25%, #111 3px, transparent 4px);
	position: relative;
}

.orm-line::after {
	content: "";
	position: absolute;
	left: 8%;
	right: 4%;
	top: 28%;
	height: 2px;
	background: #111;
	clip-path: polygon(0 60%, 25% 10%, 50% 55%, 75% 35%, 100% 20%, 100% 22%, 75% 37%, 50% 57%, 25% 12%, 0 62%);
}

.orm-table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 -4px;
	padding: 0 4px;
}

.orm-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.orm-table-wrap .orm-table {
	min-width: 640px;
}

.orm-table th,
.orm-table td {
	text-align: left;
	padding: 12px 8px;
	border-bottom: 1px solid rgba(17, 17, 17, 0.06);
	vertical-align: top;
	word-break: break-word;
}

.orm-table th {
	color: var(--orm-muted);
	font-weight: 700;
	font-size: 0.8rem;
}

.orm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 0;
	cursor: pointer;
	border-radius: 999px;
	padding: 10px 16px;
	font-weight: 700;
	font-family: inherit;
	font-size: 0.9rem;
	text-decoration: none;
	background: #111;
	color: #fff;
	transition: transform .15s ease, opacity .15s ease;
}

.orm-btn:hover {
	transform: translateY(-1px);
	opacity: 0.92;
	color: #fff;
}

.orm-btn--lime {
	background: var(--orm-lime);
	color: #111;
}

.orm-btn--ghost {
	background: rgba(17, 17, 17, 0.06);
	color: var(--orm-ink);
}

.orm-btn--sm {
	padding: 7px 12px;
	font-size: 0.8rem;
}

.orm-form {
	display: grid;
	gap: 12px;
	min-width: 0;
	max-width: 100%;
}

.orm-form label {
	display: grid;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--orm-muted);
	min-width: 0;
}

.orm-form input,
.orm-form select,
.orm-form textarea {
	border: 1px solid rgba(17, 17, 17, 0.1);
	border-radius: 14px;
	padding: 12px 14px;
	font: inherit;
	color: var(--orm-ink);
	background: #fff;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.orm-form input[type="checkbox"],
.orm-form input[type="radio"] {
	width: auto;
	max-width: none;
	min-width: 1.1rem;
	height: 1.1rem;
	margin: 0.2rem 0 0;
	padding: 0;
	border-radius: 4px;
	flex-shrink: 0;
	accent-color: #111;
}

.orm-form .orm-check {
	display: grid;
	grid-template-columns: 1.25rem minmax(0, 1fr);
	column-gap: 12px;
	align-items: start;
	font-weight: 500;
	color: var(--orm-ink);
	line-height: 1.45;
}

.orm-form .orm-check span {
	min-width: 0;
}

.orm-form .orm-check a {
	color: inherit;
	font-weight: 700;
}

.orm-form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	min-width: 0;
}

.orm-list {
	display: grid;
	gap: 10px;
}

.orm-list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.7);
}

.orm-hero-photo {
	min-height: 180px;
	border-radius: var(--orm-card-radius);
	background-color: #1f2937;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	color: #fff;
	padding: 22px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	box-shadow: var(--orm-shadow);
}

.orm-hero-photo h2 {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 800;
}

.orm-hero-photo p {
	margin: 6px 0 0;
	opacity: 0.9;
}

@media (max-width: 1100px) {
	.orm-span-3,
	.orm-span-4,
	.orm-span-5,
	.orm-span-6,
	.orm-span-7,
	.orm-span-8 {
		grid-column: span 12;
	}
	.orm-form-row {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.orm-card {
		padding: 16px;
	}
	.orm-form-row {
		grid-template-columns: 1fr;
	}
	.orm-table-wrap .orm-table {
		min-width: 520px;
		font-size: 0.85rem;
	}
	.orm-btn {
		width: 100%;
	}
	.orm-btn--sm {
		width: auto;
	}
}
