.yg-card-retiro,
.yg-study-card { position: relative; }

.yg-saved-revalidating [data-saved-toolbar],
.yg-saved-revalidating [data-saved-grid],
.yg-saved-revalidating [data-saved-state],
.yg-saved-revalidating [data-private-account] { display: none !important; }
.yg-saved-revalidating [data-yg-save] { visibility: hidden; }

.yg-save-button {
	align-items: center;
	background: rgba(255,255,255,.94);
	border: 1px solid rgba(65,79,68,.22);
	border-radius: 999px;
	color: var(--yg-primary-dark, #496653);
	cursor: pointer;
	display: inline-flex;
	font: 600 .94rem/1 var(--yg-font-body, inherit);
	gap: .48rem;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: .65rem .9rem;
	transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
	z-index: 5;
}
.yg-save-button svg { fill: transparent; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.yg-save-button:hover { background: #fff; border-color: var(--yg-primary, #668a70); transform: translateY(-1px); }
.yg-save-button:focus-visible { outline: 3px solid #d29a58; outline-offset: 3px; }
.yg-save-button[aria-pressed="true"] { background: var(--yg-primary-dark, #496653); border-color: var(--yg-primary-dark, #496653); color: #fff; }
.yg-save-button[aria-pressed="true"] svg { fill: currentColor; }
.yg-save-button[aria-busy="true"] { cursor: wait; opacity: .7; }
.yg-save-button--card { box-shadow: 0 3px 12px rgba(27,42,31,.14); padding: 0; position: absolute; right: 12px; top: 12px; }
.yg-save-button--detail { margin-top: .9rem; }

.yg-saved-shell { margin: 0 auto; max-width: 1200px; padding: 1.5rem 1.25rem 4rem; }
.yg-saved-shell [hidden] { display: none !important; }
.yg-saved-hero { background: linear-gradient(135deg, #eff3eb, #f8f4ea); border: 1px solid var(--yg-border, #e5e2dc); border-radius: 24px; margin-bottom: 1.5rem; padding: clamp(1.5rem, 4vw, 3rem); }
.yg-saved-kicker { color: var(--yg-primary-dark, #496653); font-size: .78rem; font-weight: 700; letter-spacing: .12em; margin: 0 0 .55rem; text-transform: uppercase; }
.yg-saved-title { color: var(--yg-title, #343733); font: 600 clamp(2.1rem, 5vw, 4rem)/1.03 var(--yg-font-title, serif); margin: 0; }
.yg-saved-intro { color: var(--yg-text, #5e5b57); font-size: 1.06rem; margin: .8rem 0 0; max-width: 60ch; }
.yg-saved-note { background: #fff; border-left: 4px solid var(--yg-primary, #668a70); border-radius: 10px; color: var(--yg-text, #5e5b57); margin: 1rem 0 0; padding: .8rem 1rem; }
.yg-saved-note a { color: var(--yg-primary-dark, #496653); font-weight: 700; }
.yg-saved-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; justify-content: space-between; margin: 0 0 1.25rem; }
.yg-saved-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.yg-saved-filter { background: #fff; border: 1px solid var(--yg-border, #d9ddd7); border-radius: 999px; color: var(--yg-text, #4f5851); cursor: pointer; min-height: 44px; padding: .65rem 1rem; }
.yg-saved-filter[aria-pressed="true"] { background: #496653; border-color: #496653; color: #fff; }
.yg-saved-filter:focus-visible { outline: 3px solid #d29a58; outline-offset: 2px; }
.yg-saved-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0,1fr)); }
.yg-saved-card { background: #fff; border: 1px solid var(--yg-border, #e5e2dc); border-radius: 18px; box-shadow: 0 8px 28px rgba(44,53,46,.07); min-height: 100%; overflow: hidden; position: relative; }
.yg-saved-card__link { color: inherit; display: block; height: 100%; text-decoration: none; }
.yg-saved-card__media { aspect-ratio: 16/10; background: linear-gradient(135deg, #edf1e9, #f5efe5); overflow: hidden; }
.yg-saved-card__media img { background: transparent; box-sizing: border-box; height: 100%; object-fit: contain; padding: 6px; width: 100%; }
.yg-saved-card__fallback { align-items: center; color: #5d765f; display: flex; font: 600 2.8rem/1 var(--yg-font-title, serif); height: 100%; justify-content: center; }
.yg-saved-card__body { padding: 1.1rem 1.15rem 1.3rem; }
.yg-saved-card__type { color: #496653; font-size: .77rem; font-weight: 700; letter-spacing: .08em; margin: 0 0 .45rem; text-transform: uppercase; }
.yg-saved-card__title { color: var(--yg-title, #343733); font: 600 1.28rem/1.2 var(--yg-font-title, serif); margin: 0; }
.yg-saved-card__status { color: #795b34; font-size: .88rem; margin: .7rem 0 0; }
.yg-saved-card--unavailable { background: #f4f3f0; border-style: dashed; }
.yg-saved-card--unavailable .yg-saved-card__body { padding-top: 4.5rem; }
.yg-saved-state { background: #f7f7f4; border: 1px dashed #bdc7be; border-radius: 18px; padding: 2rem; text-align: center; }
.yg-saved-state h2 { font: 600 1.65rem/1.15 var(--yg-font-title, serif); margin: 0 0 .55rem; }
.yg-saved-state p { margin: 0 0 1rem; }
.yg-saved-state a, .yg-account-card .yg-btn-filled { display: inline-flex; min-height: 44px; align-items: center; }
.yg-saved-session-state { border-style: solid; }
.yg-saved-session-state button { min-height: 44px; }

.yg-account-grid { align-items: start; display: grid; gap: 1.25rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.yg-account-card { background: #fff; border: 1px solid var(--yg-border, #e5e2dc); border-radius: 18px; padding: 1.35rem; }
.yg-account-card h2 { font: 600 1.5rem/1.2 var(--yg-font-title, serif); margin: 0 0 .75rem; }
.yg-account-card p:last-child { margin-bottom: 0; }
.yg-account-card label { display: block; font-weight: 700; margin: .8rem 0 .35rem; }
.yg-account-card input[type="text"], .yg-account-card input[type="email"], .yg-account-card input[type="password"] { border: 1px solid #cdd4ce; border-radius: 9px; min-height: 46px; padding: .7rem .8rem; width: 100%; }
.yg-account-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.yg-account-page .yg-saved-hero { padding-bottom: clamp(1.35rem, 3vw, 2.2rem); padding-top: clamp(1.35rem, 3vw, 2.2rem); }
.yg-account-summary { display: grid; gap: .7rem; margin: 0 0 1rem; }
.yg-account-summary div { align-items: center; display: flex; flex-wrap: wrap; gap: .45rem .8rem; justify-content: space-between; }
.yg-account-summary dt { color: var(--yg-text, #5e5b57); font-weight: 600; }
.yg-account-summary dd { margin: 0; }
.yg-account-badge { background: #edf3eb; border-radius: 999px; color: #3d6247; display: inline-flex; font-size: .84rem; font-weight: 700; padding: .35rem .65rem; }
.yg-account-badge--pending { background: #fff2dc; color: #805c23; }
.yg-account-logout { color: #74473d; font-weight: 700; }
.yg-auth-message { border-radius: 10px; margin: 0 0 1rem; padding: .8rem 1rem; }
.yg-auth-message--error { background: #fff0ef; color: #873c35; }
.yg-auth-message--success { background: #eaf5e9; color: #315c37; }
.yg-personal-form { max-width: 620px; }
.yg-personal-form .yg-hp { left: -9999px; position: absolute; }

.yg-saved-toast { align-items: center; background: #29342c; border-radius: 12px; bottom: 1.25rem; box-shadow: 0 9px 35px rgba(0,0,0,.22); color: #fff; display: flex; gap: 1rem; left: 50%; max-width: min(92vw, 660px); padding: .85rem 1rem; position: fixed; transform: translateX(-50%); z-index: 9999; }
.yg-saved-toast a, .yg-saved-toast button { background: none; border: 0; color: #e9c48d; cursor: pointer; font: inherit; font-weight: 700; padding: .3rem; text-decoration: underline; }
.yg-saved-toast { flex-wrap: wrap; width: max-content; box-sizing: border-box; gap: .35rem .8rem; }
.yg-saved-toast a, .yg-saved-toast button { min-height: 44px; display: inline-flex; align-items: center; }
.yg-saved-toast a:focus-visible, .yg-saved-toast button:focus-visible { outline: 2px solid #e9c48d; outline-offset: 2px; }
.yg-saved-toast .yg-saved-toast__dismiss { text-decoration: none; min-width: 44px; justify-content: center; margin-left: auto; }
.yg-saved-hero.yg-saved-hero--compact { background: none; border: 0; border-radius: 0; padding: .3rem 0 .5rem; margin-bottom: 1rem; }
.yg-saved-hero--compact .yg-saved-title { font-size: clamp(1.85rem, 3vw, 2.7rem); margin-bottom: .5rem; }
.yg-saved-hero--compact .yg-saved-note { font-size: .9rem; margin-top: .5rem; padding: .5rem .75rem; }
.yg-account-start { max-width: 900px; margin: 2rem auto 0; }
.yg-account-start > h2 { font: 600 1.5rem/1.2 var(--yg-font-title, serif); margin: 0 0 1rem; }
.yg-account-card h3 { font: 600 1.35rem/1.2 var(--yg-font-title, serif); margin: 0 0 .65rem; }
.yg-account-card { min-width: 0; overflow-wrap: anywhere; }
.yg-account-card--primary { grid-column: 1 / -1; background: #eff3eb; }
.yg-account-entry { grid-template-columns: 1fr; max-width: 900px; margin: auto; }

@media (max-width: 880px) { .yg-saved-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px) {
	.yg-saved-shell { padding: .75rem 1rem 3rem; }
	.yg-saved-hero { border-radius: 18px; }
	.yg-saved-grid, .yg-account-grid { grid-template-columns: 1fr; }
	.yg-saved-filter { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) { .yg-save-button { transition: none; } }
