/* =========================
 * 时期页面专用样式
 * ========================= */
.lingxyh-template-period .lingxyh-period-nav {
	flex: 0 0 200px;
	width: 200px;
	height: fit-content;
	position: sticky;
	top: 20px;
	align-self: flex-start;
}

.lingxyh-template-period .period-system {
	display: flex;
	gap: 5px;
	margin-bottom: 15px;
}

.lingxyh-template-period .period-mode {
    display: flex;
    flex: 0 0 45px;
    width: 45px;
    min-width: 45px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid rgb(0 0 0 / 10%);
    border-radius: 11px;
    background: rgb(255 255 255 / 30%);
    color: #666;
    text-align: left;
    cursor: pointer;
    transition: .18s;
    line-height: 1;
}

.lingxyh-template-period .period-mode:hover {
    background: rgb(255 255 255 / 70%);
    color: #333;
}

.lingxyh-template-period .period-mode.is-active {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    padding: 10px;
    border-color: rgb(221 51 51 / 30%);
    background: rgb(221 51 51 / 10%);
    color: #dd3333b3;
}

.lingxyh-template-period .period-mode-mark {
	display: flex;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	align-items: center;
	justify-content: center;
	border: 1px solid rgb(0 0 0 / 10%);
	border-radius: 9px;
	background: rgb(255 255 255 / 60%);
	font-family: KaiTi, STKaiti, serif;
	font-size: 17px;
	font-weight: 700;
}

.lingxyh-template-period .period-mode.is-active .period-mode-mark {
	border-color: #dd3333b3;
	background: #dd3333b3;
	color: #fff;
}

.lingxyh-template-period .period-mode-text {
	display: none;
	min-width: 0;
}

.lingxyh-template-period .period-mode.is-active .period-mode-text,
.lingxyh-template-period .period-mode-text strong,
.lingxyh-template-period .period-mode-text small {
	display: block;
}

.lingxyh-template-period .period-mode-text strong {
	font-size: 12px;
	white-space: nowrap;
}

.lingxyh-template-period .period-mode-text small {
	margin-top: 5px;
    font-size: 10px;
    white-space: nowrap;
    opacity: .8;
}

.lingxyh-template-period .period-timeline-wrap {
	padding-top: 10px;
	border-top: 1px solid rgb(0 0 0 / 10%);
}

.lingxyh-template-period .period-timeline-title {
	margin-bottom: 10px;
	color: #666;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.lingxyh-template-period .period-timeline-title .lingxyh-btn {
    padding: 0;
    min-height: 0;
    width: 25px;
    height: 25px;
    text-align: center;
    border-radius: 50px;
    border: 1px solid rgb(0 0 0 / 20%);
	display: none;
    justify-content: center;
    align-items: center;
}

.lingxyh-template-period .period-timeline {
	position: relative;
	padding: 5px 0;
	overflow: hidden;
	opacity: 1;
	transition: max-height .3s ease, opacity .25s ease, padding .3s ease;
}

.lingxyh-template-period .period-timeline.is-collapsed {
	padding-top: 0;
	padding-bottom: 0;
	opacity: 0;
}

.lingxyh-template-period .period-timeline.is-not-animated {
	transition: none;
}

.lingxyh-template-period .period-timeline::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 10px;
    width: 1px;
    background: rgb(102 102 102 / 30%);
}

.lingxyh-template-period .period-item {
    position: relative;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    width: 100%;
    min-height: 40px;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 25px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #666;
    text-align: left;
    cursor: pointer;
}

.lingxyh-template-period .period-item:hover {
	background: rgb(255 255 255 / 50%);
}

.lingxyh-template-period .period-item.is-active {
    background: linear-gradient(90deg, rgb(221 51 51 / 15%), rgb(255 255 255 / 40%));
    color: #dd3333b3;
}

.lingxyh-template-period .period-dot {
    position: absolute;
    top: 50%;
    left: 6px;
    z-index: 2;
    width: 10px;
    height: 10px;
    border: 2px solid hsl(0deg 0% 50% / 50%);
    border-radius: 50%;
    background: #eef1f5;
    transform: translateY(-50%);
}

.lingxyh-template-period .period-item.is-active .period-dot {
	left: 3px;
    width: 15px;
    height: 15px;
    border: 3px solid rgb(255 255 255 / 90%);
    background: #dd3333b3;
}

.lingxyh-template-period .period-index {
    color: #666;
    font-size: 10px;
}

.lingxyh-template-period .period-name {
	font-size: 12px;
	font-weight: 600;
}

.lingxyh-template-period .lingxyh-main {
	min-width: 0;
}

.lingxyh-template-period .period-heading {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr) 110px;
	align-items: center;
	gap: 10px;
	padding: 15px;
	margin-bottom: 10px;
	border-radius: 15px;
	background: #ffffffb3;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .073) inset;
}

.lingxyh-template-period .period-title {
	min-width: 0;
	grid-column: 2;
}

.lingxyh-template-period .period-title h2 {
	margin: 0;
    text-align: center;
    font-size: 24px;
}

.lingxyh-template-period .period-title p {
	margin: 5px 0 0;
	color: #666;
    text-align: center;
}

.lingxyh-template-period .lingxyh-options {
	margin-bottom: 10px;
}

.lingxyh-template-period .period-filter {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.lingxyh-template-period .period-kind.is-active {
	border-color: #dd3333b3;
	background: #dd3333b3;
	color: #fff;
}

.lingxyh-template-period .period-count {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 10px;
    background: rgb(0 0 0 / 10%);
    font-size: 10px;
}

.lingxyh-template-period .period-kind.is-active .period-count {
	background: rgb(255 255 255 / 20%);
}

.lingxyh-template-period .period-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.lingxyh-template-period .period-card {
	display: grid;
	grid-template-columns: 70px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid rgb(0 0 0 / 10%);
	border-radius: 15px;
	transition: .3s;
    margin: 0;
}

.lingxyh-template-period .period-card.no-image {
	grid-template-columns: minmax(0, 1fr);
}

.lingxyh-template-period .period-feedback {
	min-height: 20px;
	color: #666;
	font-size: 12px;
}

.lingxyh-template-period .period-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    margin: 5px auto;
}

.lingxyh-template-period .period-card h3 {
	margin: 0 0 5px;
	font-size: 15px;
}

.lingxyh-template-period .period-card p {
	margin: 0;
	color: #666;
	font-size: 12px;
}

.lingxyh-template-period .lingxyh-sidebar .period-summary {
    margin: 0 0 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgb(0 0 0 / 10%);
    color: #666;
    line-height: 1.8;
}

.lingxyh-template-period .lingxyh-sidebar .period-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.lingxyh-template-period .lingxyh-sidebar .period-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-top: 10px;
}

.lingxyh-template-period .lingxyh-sidebar .period-stats > button {
	width: 100%;
	padding: 15px;
	border: 1px solid rgb(0 0 0 / 10%);
	border-radius: 10px;
	background: rgb(255 255 255 / 50%);
	color: inherit;
	cursor: pointer;
	font: inherit;
	text-align: center;
}

.lingxyh-template-period .lingxyh-sidebar .period-stats > button[aria-pressed="true"] {
    border-color: #dd3333b3;
    background: rgb(220 50 50 / 50%);
    color: #fff;
}
.lingxyh-template-period .lingxyh-sidebar .period-stats > button[aria-pressed="true"] b {
    color: #fff;
}

.lingxyh-template-period .lingxyh-sidebar .period-stats b {
	display: block;
	color: #dd3333b3;
	font-size: 24px;
}

.lingxyh-template-period .lingxyh-sidebar .period-tag-title {
    margin: 10px 0 5px;
    padding-top: 10px;
    border-top: 1px solid rgb(0 0 0 / 10%);
    color: #666;
    font-size: 12px;
    font-weight: 700;
}

.lingxyh-template-period .lingxyh-sidebar .period-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.lingxyh-template-period .lingxyh-sidebar .period-tags a {
    padding: 3px 15px;
    border-radius: 5px;
    background: #dd33331a;
    color: #dd3333cc;
    font-size: 12px;
    transition: transform 0.5s ease;
}
.lingxyh-template-period .lingxyh-sidebar .period-tags a:hover {
    background: #dd3333b3;
    color: #fff;
    transform: translateY(-3px);
}

.lingxyh-template-period .lingxyh-sidebar .period-events a {
    display: block;
    margin-bottom: 5px;
    padding: 5px;
    border-left: 5px solid #dd3333b3;
    border-radius: 0 10px 10px 0;
    background: rgb(255 255 255 / 50%);
    transform: translateX(-5px);
    margin-right: -5px;
    padding-left: 20px;
}
.lingxyh-template-period .lingxyh-sidebar .period-events a:hover {
    background: #dd3333b3;
    color: #fff;
    transform: translateY(-3px);
}
.lingxyh-template-period .lingxyh-sidebar .period-events a:last-child {
	margin-bottom: 0;
}

.lingxyh-template-period .period-prev,
.lingxyh-template-period .period-next {
	display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.lingxyh-template-period .period-prev {
	grid-column: 1;
}

.lingxyh-template-period .period-next {
	grid-column: 3;
}

.lingxyh-template-period .period-prev[hidden],
.lingxyh-template-period .period-next[hidden] {
	display: none;
}

@media screen and (max-width: 750px) {
	.lingxyh-template-period .lingxyh-content {
		flex-wrap: wrap;
		gap: 0;
	}

	.lingxyh-template-period .lingxyh-period-nav {
		flex: 0 0 100%;
		width: 100%;
		position: static;
	}

	.lingxyh-template-period .period-system {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}

	.lingxyh-template-period .period-mode,
	.lingxyh-template-period .period-mode.is-active {
		width: auto;
		min-width: 0;
		justify-content: flex-start;
		padding: 5px 10px;
	}

	.lingxyh-template-period .period-mode-text {
		display: block;
	}

	.lingxyh-template-period .period-timeline {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 5px;
		padding: 0;
	}

	.lingxyh-template-period .period-timeline::before,
	.lingxyh-template-period .period-dot {
		display: none;
	}

	.lingxyh-template-period .period-item {
		grid-template-columns: 20px minmax(0, 1fr);
        padding: 5px 10px;
		border: 1px solid rgb(0 0 0 / 10%);
		background: rgb(255 255 255 / 40%);
	}
}

@media screen and (max-width: 520px) {
	.lingxyh-template-period .period-timeline-title .lingxyh-btn {
		display: flex;
	}

	.lingxyh-template-period .period-title {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.lingxyh-template-period .period-prev,
	.lingxyh-template-period .period-next {
		grid-row: 2;
	}

	.lingxyh-template-period .period-prev {
		grid-column: 1;
	}

	.lingxyh-template-period .period-next {
		grid-column: 2;
	}
	
	.lingxyh-template-period .period-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.lingxyh-template-period .period-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
	}
	.lingxyh-template-period .period-heading {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media screen and (max-width: 300px) {
	.lingxyh-template-period .period-timeline {
        grid-template-columns: repeat(1, minmax(0, 1fr));
	}
	.lingxyh-template-period .period-prev,
	.lingxyh-template-period .period-next {
		display: none;
	}
}
