/* =====================================================================
 * 小冲标签云 · 6 种风格  v1.0.0
 * 所有样式都在 .xc-tc 下面，不会影响主题其它部分。
 * 想统一改颜色/字体：改下面 .xc-tc 里的变量即可。
 * ===================================================================== */

.xc-tc {
	--xc-ink: #1d1d1f;
	--xc-paper: #f4f3ef;
	--xc-yellow: #f9d73d;
	--xc-clay: #b06250;
	--xc-pink: #f3dcd3;
	--xc-muted: #5f5f64;
	--xc-serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", SimSun, serif;
	--xc-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
	font-family: var(--xc-sans);
	color: var(--xc-ink);
	margin: 0 0 32px;
}
.xc-tc *, .xc-tc *::before, .xc-tc *::after { box-sizing: border-box; }
.xc-tc a { text-decoration: none !important; box-shadow: none; }

/* ---------- 共用：标题与底部 ---------- */
.xc-tc__head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 16px; }
.xc-tc__title { margin: 0; font-family: var(--xc-serif); font-size: 21px; font-weight: 900; line-height: 1.3; color: var(--xc-ink); }
.xc-tc__dot { color: var(--xc-clay); }
.xc-tc__sub { font-size: 10px; letter-spacing: 3px; color: var(--xc-muted); }
.xc-tc__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12px; color: var(--xc-muted); }
.xc-tc__foot a { color: var(--xc-clay); font-weight: 500; }
.xc-tc__foot a:hover { text-decoration: underline !important; }
.xc-tc a:focus-visible { outline: 3px solid var(--xc-yellow); outline-offset: 2px; }
.xc-tc__wrap { display: flex; flex-wrap: wrap; }

/* =====================================================================
 * 03 书架 .xc-tc--shelf
 * ===================================================================== */
.xc-tc__shelves {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 34px), 1fr));
	gap: 9px 0;
	align-items: stretch;
}
.xc-tc__shelf-cell {
	display: flex;
	align-items: flex-end;
	min-width: 0;
	padding: 0 2px;
	border-bottom: 2px solid var(--xc-ink);
}
.xc-tc__book {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: var(--book-height, 76px);
	padding: 7px 2px 12px;
	border: 1px solid var(--xc-ink);
	border-radius: 3px 3px 1px 1px;
	font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "DengXian", "SimHei", system-ui, sans-serif;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.17;
	text-align: center;
	writing-mode: horizontal-tb;
	animation: xc-peek 9s ease-in-out infinite;
	animation-delay: var(--book-delay, 0s);
	transition: transform .3s cubic-bezier(.3,1.5,.5,1);
}
.xc-tc__book-text { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.xc-tc__book-glyph { display: block; }
.xc-tc__shelf-cell--wide { grid-column: span 2; }
.xc-tc__book::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 5px; height: 1px; background: currentColor; opacity: .48; }
.xc-tc__book:hover { box-shadow: inset 0 0 0 1px currentColor; }
.xc-tc__book:focus-visible { position: relative; z-index: 1; outline-offset: 1px; }
@keyframes xc-peek {
	0%, 90%, 100% { translate: 0 0; }
	94%, 97% { translate: 0 -9px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.xc-tc__book:hover { z-index: 2; transform: translateY(-10px) rotate(-2deg); }
}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__book { transform: none; }
@media (max-width: 600px) {
	.xc-tc__shelves { grid-template-columns: repeat(auto-fill, minmax(min(100%, 44px), 1fr)); }
}

/* =====================================================================
 * 01 印章浮动 .xc-tc--stamp
 * ===================================================================== */
.xc-tc--stamp .xc-tc__wrap { gap: 10px 8px; }
.xc-tc__stamp {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-weight: 500;
	border: 2px solid var(--xc-ink); border-radius: 11px;
	animation: xc-bob 3.2s ease-in-out infinite; transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s;
}
.xc-tc__stamp:hover, .xc-tc__stamp:focus-visible { transform: rotate(-4deg) scale(1.06); box-shadow: 3px 3px 0 var(--xc-ink) !important; }
.xc-tc__n { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(128,128,128,.18); transition: all .2s; }
.xc-tc__stamp:hover .xc-tc__n { background: var(--xc-ink); color: var(--xc-yellow); }
@keyframes xc-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }

/* =====================================================================
 * 05 三行跑马灯 .xc-tc--marquee
 * ===================================================================== */
.xc-tc__feature {
	display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 14px 16px;
	color: var(--xc-ink); background: var(--xc-yellow); border: 2px solid var(--xc-ink); border-radius: 16px;
	box-shadow: 4px 4px 0 var(--xc-ink) !important; transition: transform .2s;
}
.xc-tc__feature:hover { transform: translate(-2px, -2px); }
.xc-tc__feature span { display: flex; flex-direction: column; gap: 4px; }
.xc-tc__feature small { font-size: 10px; letter-spacing: 3px; }
.xc-tc__feature b { font-family: var(--xc-serif); font-size: 22px; font-weight: 900; }
.xc-tc__feature i { width: 34px; height: 34px; border-radius: 50%; background: var(--xc-ink); color: var(--xc-yellow); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 17px; }
.xc-tc__rows { display: flex; flex-direction: column; gap: 12px; }
.xc-tc__mq {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.xc-tc__trk { display: flex; width: max-content; animation: xc-mq 24s linear infinite; }
.xc-tc__mq--2 .xc-tc__trk { animation-direction: reverse; animation-duration: 28s; }
.xc-tc__mq--3 .xc-tc__trk { animation-duration: 32s; }
.xc-tc__mq:hover .xc-tc__trk, .xc-tc__mq:focus-within .xc-tc__trk { animation-play-state: paused; }
.xc-tc__set { display: flex; gap: 8px; padding-right: 8px; }
.xc-tc__pill { flex: none; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--xc-ink); background: #fff; border: 2px solid var(--xc-ink); border-radius: 999px; transition: transform .2s, background .2s; }
.xc-tc__mq--1 .xc-tc__pill:nth-child(odd) { background: var(--xc-ink); color: var(--xc-paper); }
.xc-tc__mq--2 .xc-tc__pill:nth-child(odd) { background: var(--xc-pink); }
.xc-tc__pill:hover { transform: translateY(-3px); background: var(--xc-yellow) !important; color: var(--xc-ink) !important; }
@keyframes xc-mq { to { transform: translateX(-50%); } }

/* =====================================================================
 * 06 便签墙 .xc-tc--notes
 * ===================================================================== */
.xc-tc--notes .xc-tc__wrap { gap: 22px 12px; justify-content: center; padding-top: 8px; }
.xc-tc__note {
	position: relative; padding: 14px 12px 10px; font-size: 14px; font-weight: 500;
	box-shadow: 0 6px 10px -6px rgba(45,41,35,.35) !important; transform-origin: 50% 0;
	animation: xc-sway 5s ease-in-out infinite; transition: transform .25s;
}
.xc-tc__note.is-big { font-family: var(--xc-serif); font-size: 17px; font-weight: 900; }
.xc-tc__note small { display: block; margin-top: 4px; font-family: var(--xc-sans); font-size: 10px; font-weight: 400; opacity: .7; }
.xc-tc__note::before {
	content: ""; position: absolute; top: -7px; left: 50%; width: 34px; height: 13px; margin-left: -17px; rotate: -4deg;
	background: rgba(249,215,61,.75); border-left: 1px dashed rgba(29,29,31,.25); border-right: 1px dashed rgba(29,29,31,.25);
}
.xc-tc__note:hover, .xc-tc__note:focus-visible { animation-play-state: paused; transform: translateY(-4px) scale(1.08); z-index: 2; }
@keyframes xc-sway { 0%, 100% { rotate: var(--r); } 50% { rotate: calc(var(--r) * -0.6); } }

/* =====================================================================
 * 07 冒泡泡 .xc-tc--bubbles
 * ===================================================================== */
.xc-tc__pool { position: relative; height: 320px; overflow: hidden; background: #fff; border: 2px solid var(--xc-ink); border-radius: 20px; }
.xc-tc__float { position: absolute; top: 0; animation: xc-up 14s linear infinite; }
.xc-tc__bubble {
	display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; font-weight: 500;
	border: 2px solid var(--xc-ink); border-radius: 50%;
	animation: xc-wob 3s ease-in-out infinite; transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.xc-tc__pool:hover .xc-tc__float, .xc-tc__pool:hover .xc-tc__bubble,
.xc-tc__pool:focus-within .xc-tc__float, .xc-tc__pool:focus-within .xc-tc__bubble { animation-play-state: paused; }
.xc-tc__bubble:hover, .xc-tc__bubble:focus-visible { transform: scale(1.15); }
@keyframes xc-up { from { transform: translateY(340px); } to { transform: translateY(-120px); } }
@keyframes xc-wob { 0%, 100% { translate: -6px 0; } 50% { translate: 6px 0; } }

/* =====================================================================
 * 09 漫画对话框 .xc-tc--comic
 * ===================================================================== */
.xc-tc__panel {
	display: flex; flex-wrap: wrap; align-content: flex-start; gap: 22px 10px; padding: 20px 14px 26px;
	background-color: #fff; background-image: radial-gradient(rgba(29,29,31,.13) 1.2px, transparent 1.4px); background-size: 9px 9px;
	border: 2.5px solid var(--xc-ink); border-radius: 6px; box-shadow: 5px 5px 0 var(--xc-ink);
}
.xc-tc__say {
	position: relative; padding: 7px 13px; font-weight: 700; border: 2px solid var(--xc-ink); border-radius: 18px;
	animation: xc-pop 12s ease-out infinite; transition: transform .2s cubic-bezier(.3,1.7,.5,1);
}
.xc-tc__say::after {
	content: ""; position: absolute; bottom: -7px; left: 16px; width: 10px; height: 10px; background: inherit;
	border-right: 2px solid var(--xc-ink); border-bottom: 2px solid var(--xc-ink); rotate: 45deg; transform: skewX(12deg);
}
.xc-tc__say.is-r::after { left: auto; right: 16px; }
.xc-tc__say:hover, .xc-tc__say:focus-visible { transform: rotate(-4deg) translateY(-3px); }
@keyframes xc-pop { 0%, 100% { scale: 1; } 3% { scale: 1.16; } 6% { scale: .96; } 9% { scale: 1; } }

/* ---------- 访客系统开了「减少动态效果」：全部静止 ---------- */
@media (prefers-reduced-motion: reduce) {
	.xc-tc *, .xc-tc *::before, .xc-tc *::after { animation: none !important; transition: none !important; }
	.xc-tc__float { position: static; }
	.xc-tc__pool { height: auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
}

/* Site integration: keep long labels readable in the existing narrow sidebars. */
.xc-tc{min-width:0;max-width:100%;margin-bottom:20px}
.xc-tc__head,.xc-tc__foot{gap:7px;flex-wrap:wrap}
.xc-tc__title{font-size:1.05rem !important;overflow-wrap:anywhere}
.xc-tc__note,.xc-tc__stamp,.xc-tc__say,.xc-tc__feature span,.xc-tc__bubble{min-width:0;max-width:100%;overflow-wrap:anywhere}
.xc-tc__feature i{flex:0 0 34px}
.xc-tc__row{flex-wrap:wrap;min-height:initial}
.xc-tc__motion{margin:0 4px 12px 0;accent-color:var(--xc-ink);vertical-align:middle}
.xc-tc__pause{display:inline-block;font-size:.75rem;color:var(--xc-muted);margin-bottom:12px;vertical-align:middle;cursor:pointer}
.xc-tc__motion:checked ~ .xc-tc__body *, .xc-tc__body:focus-within *{animation-play-state:paused!important}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__mq,.xc-tc__body:focus-within .xc-tc__mq{mask-image:none}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__trk,.xc-tc__body:focus-within .xc-tc__trk{width:100%;transform:none!important}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__set:not([aria-hidden]),.xc-tc__body:focus-within .xc-tc__set:not([aria-hidden]){flex-wrap:wrap}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__set[aria-hidden],.xc-tc__body:focus-within .xc-tc__set[aria-hidden]{display:none}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__pool,.xc-tc__body:focus-within .xc-tc__pool{height:auto;display:flex;flex-wrap:wrap;gap:8px;padding:12px}
.xc-tc__motion:checked ~ .xc-tc__body .xc-tc__float,.xc-tc__body:focus-within .xc-tc__float{position:static;transform:none!important}
@media (prefers-reduced-motion: reduce){
 .xc-tc__motion,.xc-tc__pause,.xc-tc__set[aria-hidden]{display:none}
 .xc-tc__mq{mask-image:none}
 .xc-tc__trk{width:100%}
 .xc-tc__set:not([aria-hidden]){flex-wrap:wrap}
}
