.mytgr {
	--mytgr-star: #fbbc04;
	--mytgr-accent: #1a73e8;
	--mytgr-card: #ffffff;
	--mytgr-text: #3c4043;
	--mytgr-border: #e6e6e6;
	--mytgr-radius: 12px;
	--mytgr-gap: 20px;
	--mytgr-cols: 3;
	position: relative;
	color: var(--mytgr-text);
	font-size: 15px;
	line-height: 1.6;
	box-sizing: border-box;
}
.mytgr *, .mytgr *::before, .mytgr *::after { box-sizing: border-box; }

/* Summary header */
.mytgr-summary {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin: 0 0 var(--mytgr-gap);
}
.mytgr-summary .mytgr-g { width: 36px; height: 36px; flex: none; }
.mytgr-summary-body { flex: 1 1 auto; min-width: 0; }
.mytgr-summary-name { font-weight: 600; font-size: 16px; }
.mytgr-summary-rating { display: flex; align-items: center; gap: 8px; }
.mytgr-summary-rating strong { font-size: 26px; line-height: 1; }
.mytgr-summary-rating .mytgr-star { width: 20px; height: 20px; }
.mytgr-summary-count { font-size: 13px; opacity: .75; }
.mytgr-write {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--mytgr-accent);
	color: #fff !important;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 600;
	transition: filter .2s;
}
.mytgr-write:hover { filter: brightness(1.1); }

/* Viewport and pages */
.mytgr-viewport {
	overflow: hidden;
	touch-action: pan-y;
	padding: 4px;
	margin: -4px;
}
.mytgr-track {
	display: flex;
	transition: transform .55s cubic-bezier(.22, .61, .36, 1);
	will-change: transform;
}
.mytgr-page {
	flex: 0 0 100%;
	display: grid;
	gap: var(--mytgr-gap);
	align-content: start;
	align-items: stretch;
	padding: 0 2px;
}

/* No-JS fallback: plain grid */
.mytgr:not(.is-ready) .mytgr-track {
	display: grid;
	grid-template-columns: repeat(var(--mytgr-cols), minmax(0, 1fr));
	gap: var(--mytgr-gap);
}
.mytgr:not(.is-ready) .mytgr-nav { display: none; }
@media (max-width: 767px) {
	.mytgr:not(.is-ready) .mytgr-track { grid-template-columns: 1fr; }
}

/* Card */
.mytgr-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding: 20px 22px;
	background: var(--mytgr-card);
	border: 1px solid var(--mytgr-border);
	border-radius: var(--mytgr-radius);
	transition: transform .25s ease, box-shadow .25s ease;
}
.mytgr-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .07); }
.mytgr-head { display: flex; align-items: center; gap: 12px; }
.mytgr-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	flex: none;
	object-fit: cover;
}
.mytgr-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}
.mytgr-author { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.mytgr-name {
	font-weight: 600;
	color: inherit !important;
	text-decoration: none !important;
	line-height: 1.3;
	font-size: 15px;
	overflow-wrap: break-word;
	word-break: normal;
}
a.mytgr-name:hover { color: var(--mytgr-accent) !important; }
.mytgr-time { font-size: 12.5px; opacity: .65; }
.mytgr-card { position: relative; }
.mytgr-head { padding-right: 26px; }
.mytgr-head .mytgr-g { position: absolute; top: 20px; right: 20px; width: 20px; height: 20px; }

/* Stars */
.mytgr-stars { display: inline-flex; gap: 2px; }
.mytgr-star {
	position: relative;
	display: inline-block;
	width: 17px;
	height: 17px;
}
.mytgr-star svg { width: 100%; height: 100%; display: block; fill: rgba(0, 0, 0, .15); }
.mytgr-star::after {
	content: "";
	position: absolute;
	inset: 0;
	width: var(--mytgr-fill, 100%);
	background: var(--mytgr-star);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E") left center / var(--mytgr-mask-w, 17px) 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E") left center / var(--mytgr-mask-w, 17px) 100% no-repeat;
}
.mytgr-summary-rating .mytgr-star::after { --mytgr-mask-w: 20px; }

/* Text */
.mytgr-text { font-size: 14.5px; line-height: 1.6; }
.mytgr-text p { margin: 0 0 .6em; }
.mytgr-text p:last-child { margin-bottom: 0; }
.mytgr-text.is-clamped {
	max-height: calc(var(--mytgr-lines, 5) * 1.6em);
	overflow: hidden;
}
.mytgr-text.is-clamped.is-overflow {
	-webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
	mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
.mytgr-more {
	align-self: flex-start;
	margin-top: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mytgr-accent);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.mytgr-more:hover { text-decoration: underline; }

/* Navigation */
.mytgr-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: calc(var(--mytgr-gap) + 4px);
}
.mytgr-nav[hidden] { display: none; }
.mytgr-prev, .mytgr-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--mytgr-border);
	background: var(--mytgr-card);
	color: var(--mytgr-text);
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.mytgr-prev:hover, .mytgr-next:hover {
	background: var(--mytgr-accent);
	border-color: var(--mytgr-accent);
	color: #fff;
}
.mytgr-prev svg, .mytgr-next svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.mytgr-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mytgr-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--mytgr-border);
	cursor: pointer;
	transition: width .3s, background .3s;
}
.mytgr-dot.is-active { width: 24px; background: var(--mytgr-accent); }
.mytgr button:focus-visible, .mytgr a:focus-visible {
	outline: 2px solid var(--mytgr-accent);
	outline-offset: 2px;
}
.mytgr-empty { padding: 12px 16px; border: 1px dashed #c3c4c7; border-radius: 8px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
	.mytgr-track, .mytgr-viewport, .mytgr-card { transition: none; }
}
