.pvt {
	--pvt-ink: #17221c;
	--pvt-muted: #68736c;
	--pvt-line: #dfe5df;
	--pvt-paper: #fbfcf8;
	--pvt-accent: #1d6547;
	--pvt-accent-dark: #124a34;
	--pvt-warm: #d6a545;
	box-sizing: border-box;
	width: min(100%, 1040px);
	margin: 2rem auto;
	color: var(--pvt-ink);
	font-size: 16px;
	line-height: 1.55;
}

.pvt *, .pvt *::before, .pvt *::after { box-sizing: border-box; }
.pvt h2, .pvt h3, .pvt h4, .pvt p { margin-top: 0; }
.pvt h2, .pvt h3 { color: var(--pvt-ink); line-height: 1.12; }
.pvt h2 { margin-bottom: .55rem; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.045em; }
.pvt h3 { margin-bottom: .35rem; }
.pvt-heading { margin-bottom: 2rem; }
.pvt-heading p { max-width: 620px; margin-bottom: 0; color: var(--pvt-muted); }
.pvt-eyebrow { display: block; margin-bottom: .55rem; color: var(--pvt-accent); font-size: .75rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }

.pvt-button {
	appearance: none;
	min-height: 46px;
	padding: .7rem 1rem;
	border: 1px solid var(--pvt-line);
	border-radius: 9px;
	background: #fff;
	color: var(--pvt-ink);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.pvt-button:hover { transform: translateY(-1px); border-color: #aeb9b1; }
.pvt-button:focus-visible, .pvt input:focus-visible, .pvt textarea:focus-visible, .pvt select:focus-visible { outline: 3px solid rgba(29, 101, 71, .22); outline-offset: 2px; }
.pvt-button:disabled { cursor: wait; opacity: .55; }
.pvt-button-primary { border-color: var(--pvt-accent); background: var(--pvt-accent); color: #fff; }
.pvt-button-primary:hover { border-color: var(--pvt-accent-dark); background: var(--pvt-accent-dark); color: #fff; }
.pvt-button-quiet { min-height: 40px; padding: .55rem .85rem; }

.pvt-speech-button {
	display: inline-flex;
	min-height: 38px;
	padding: .45rem .7rem;
	align-items: center;
	gap: .38rem;
	border: 1px solid #b9c9bd;
	border-radius: 999px;
	background: #fff;
	color: var(--pvt-accent);
	font: inherit;
	font-size: .78rem;
	font-weight: 750;
	line-height: 1;
	cursor: pointer;
	transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.pvt-speech-button:hover { transform: translateY(-1px); border-color: var(--pvt-accent); background: #edf6f0; }
.pvt-speech-button:focus-visible { outline: 3px solid rgba(29, 101, 71, .22); outline-offset: 2px; }
.pvt-speech-button svg { width: 18px; height: 18px; fill: currentColor; }
.pvt-speech-button.is-speaking { border-color: var(--pvt-accent); background: var(--pvt-accent); color: #fff; }
.pvt-speech-button.is-speaking svg { animation: pvt-audio-pulse .8s ease-in-out infinite alternate; }

.pvt-form, .pvt-review-card, .pvt-stat-card, .pvt-empty {
	border: 1px solid var(--pvt-line);
	border-radius: 16px;
	background: var(--pvt-paper);
	box-shadow: 0 18px 45px rgba(23, 34, 28, .06);
}
.pvt-form { padding: clamp(1.1rem, 3vw, 2.25rem); }
.pvt-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.35rem; }
.pvt label { display: flex; flex-direction: column; gap: .4rem; color: var(--pvt-ink); font-size: .87rem; font-weight: 700; }
.pvt input, .pvt textarea, .pvt select {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: .7rem .8rem;
	border: 1px solid #cbd4cc;
	border-radius: 8px;
	background: #fff;
	color: var(--pvt-ink);
	font: inherit;
	font-weight: 400;
}
.pvt textarea { min-height: 108px; resize: vertical; }
.pvt-field-wide { grid-column: 1 / -1; }
.pvt-notice { margin-bottom: 1.2rem; padding: .85rem 1rem; border-left: 4px solid; border-radius: 4px; background: #fff; }
.pvt-notice.is-success { border-color: var(--pvt-accent); }
.pvt-notice.is-error { border-color: #a63535; }

.pvt-review { max-width: 760px; }
.pvt-review-card { overflow: hidden; }
.pvt-card-front { display: flex; min-height: 390px; padding: clamp(1.5rem, 6vw, 4.5rem); flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% 30%, #fff 0, var(--pvt-paper) 68%); }
.pvt-card-front h3 { margin: .6rem 0; font-size: clamp(3rem, 11vw, 6.6rem); letter-spacing: -.055em; overflow-wrap: anywhere; }
.pvt-review-word { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .7rem; }
.pvt-review-word .pvt-speech-button { flex: none; }
.pvt-pronunciation { color: var(--pvt-muted); }
.pvt-review-meta { padding: .25rem .6rem; border-radius: 99px; background: #e7efe9; color: var(--pvt-accent); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pvt-card-front .pvt-button { margin-top: 1.5rem; min-width: 190px; }
.pvt-card-answer { padding: clamp(1.2rem, 5vw, 3rem); border-top: 1px solid var(--pvt-line); background: #fff; }
.pvt-card-answer section { padding: .85rem 0; border-bottom: 1px solid var(--pvt-line); }
.pvt-card-answer h4 { margin-bottom: .25rem; color: var(--pvt-muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.pvt-card-answer p { margin-bottom: 0; white-space: normal; }
.pvt-answer-with-audio { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pvt-answer-with-audio > div { min-width: 0; }
.pvt-answer-with-audio .pvt-speech-button { flex: none; }
.pvt-review-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; padding-top: 1.4rem; }
.pvt-rate-forgot { border-color: #d9a0a0; color: #8e2f2f; }
.pvt-rate-remembered { border-color: var(--pvt-accent); background: var(--pvt-accent); color: #fff; }
.pvt-rate-easy { border-color: #d2b56d; background: #fff9e8; color: #72550d; }
.pvt-review-card.is-loading { opacity: .65; }

.pvt-library { width: min(94vw, 1580px); max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
.pvt-library .pvt-heading { display: flex; flex-wrap: wrap; align-items: end; column-gap: 1rem; }
.pvt-library .pvt-heading .pvt-eyebrow { width: 100%; }
.pvt-library .pvt-heading h2 { margin-right: auto; }
.pvt-library-count { margin-bottom: .65rem !important; padding: .35rem .7rem; border-radius: 999px; background: #e7f1ea; color: var(--pvt-accent) !important; font-size: .8rem; font-weight: 800; }
.pvt-library-filters { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(140px, 1fr)) auto; gap: .65rem; margin-bottom: 1rem; padding: .85rem; border: 1px solid #d9e1db; border-radius: 12px; background: rgba(255, 255, 255, .88); box-shadow: 0 10px 28px rgba(18, 74, 52, .06); }
.pvt-library-filters input, .pvt-library-filters select { min-height: 42px; border-radius: 7px; font-size: .86rem; }
.pvt-library-filters .pvt-button { min-height: 42px; }
.pvt-workbook { overflow: hidden; border: 1px solid #c8d1ca; border-radius: 14px; background: #fff; box-shadow: 0 24px 60px rgba(23, 34, 28, .12); }
.pvt-workbook-bar { display: flex; min-height: 54px; padding: .65rem 1rem; align-items: center; gap: .65rem; background: linear-gradient(110deg, #155f3f, #217348); color: #fff; }
.pvt-workbook-bar strong { font-size: .92rem; letter-spacing: .01em; }
.pvt-workbook-bar > span:last-child { margin-left: auto; color: rgba(255, 255, 255, .72); font-size: .72rem; }
.pvt-workbook-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; background: rgba(255,255,255,.14); font-weight: 850; }
.pvt-sheet-scroll { max-height: 72vh; overflow: auto; background: #f8faf8; scrollbar-color: #9eb2a3 #eef2ef; }
.pvt-sheet-scroll:focus-visible { outline: 3px solid rgba(29, 101, 71, .25); outline-offset: -3px; }
.pvt-sheet { width: 100%; min-width: 1540px; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: #fff; font-size: .82rem; line-height: 1.42; }
.pvt-sheet th, .pvt-sheet td { height: 54px; padding: .62rem .7rem; border: 0; border-right: 1px solid #dfe5e0; border-bottom: 1px solid #dfe5e0; vertical-align: middle; text-align: left; overflow-wrap: anywhere; }
.pvt-sheet thead th { position: sticky; top: 25px; z-index: 4; height: 42px; padding: .55rem .7rem; background: #edf3ee; color: #35463b; font-size: .69rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; box-shadow: inset 0 -1px #c9d3cb; }
.pvt-sheet .pvt-sheet-letters th { top: 0; z-index: 5; height: 25px; padding: .18rem; background: #f5f7f5; color: #7b887f; text-align: center; font-size: .64rem; font-weight: 700; }
.pvt-sheet tbody tr:nth-child(even) td { background: #fbfdfb; }
.pvt-sheet tbody tr:hover td { background: #f0f7f2; }
.pvt-sheet tbody tr { transition: opacity .18s ease; }
.pvt-sheet tbody tr.is-deleting { opacity: .35; }
.pvt-sheet th:nth-child(1), .pvt-sheet td:nth-child(1) { width: 48px; }
.pvt-sheet th:nth-child(2), .pvt-sheet td:nth-child(2) { width: 190px; }
.pvt-sheet th:nth-child(3), .pvt-sheet td:nth-child(3) { width: 130px; }
.pvt-sheet th:nth-child(4), .pvt-sheet td:nth-child(4) { width: 230px; }
.pvt-sheet th:nth-child(5), .pvt-sheet td:nth-child(5) { width: 300px; }
.pvt-sheet th:nth-child(6), .pvt-sheet td:nth-child(6) { width: 170px; }
.pvt-sheet th:nth-child(7), .pvt-sheet td:nth-child(7), .pvt-sheet th:nth-child(8), .pvt-sheet td:nth-child(8) { width: 125px; }
.pvt-sheet th:nth-child(9), .pvt-sheet td:nth-child(9) { width: 120px; }
.pvt-sheet th:nth-child(10), .pvt-sheet td:nth-child(10) { width: 190px; }
.pvt-sheet th:nth-child(11), .pvt-sheet td:nth-child(11) { width: 190px; }
.pvt-sheet .pvt-row-number { position: sticky; left: 0; z-index: 3; background: #f3f5f3 !important; color: #7a867e; text-align: center; font-size: .7rem; font-weight: 700; }
.pvt-sheet thead .pvt-row-number { z-index: 7; }
.pvt-sheet th:nth-child(2), .pvt-sheet td:nth-child(2) { position: sticky; left: 48px; z-index: 2; background: #fff; box-shadow: 1px 0 #cfd8d1, 7px 0 12px rgba(23,34,28,.03); }
.pvt-sheet thead th:nth-child(2) { z-index: 6; background: #edf3ee; }
.pvt-sheet .pvt-sheet-letters th:nth-child(2) { background: #f5f7f5; }
.pvt-sheet tbody tr:nth-child(even) td:nth-child(2) { background: #fbfdfb; }
.pvt-sheet tbody tr:hover td:nth-child(2) { background: #f0f7f2; }
.pvt-cell-word > div, .pvt-cell-example > div { display: flex; align-items: center; gap: .45rem; }
.pvt-cell-word strong { color: #163d2b; font-size: .98rem; letter-spacing: -.01em; }
.pvt-cell-word small { display: block; margin-top: .2rem; color: var(--pvt-muted); font-size: .7rem; }
.pvt-cell-cn { font-size: .92rem; font-weight: 700; }
.pvt-cell-tags { color: var(--pvt-accent); font-size: .72rem; }
.pvt-sheet .pvt-speech-button { min-width: 31px; min-height: 31px; padding: .35rem; justify-content: center; border-color: #c9d8cc; }
.pvt-sheet .pvt-speech-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.pvt-sheet .pvt-speech-button svg { width: 16px; height: 16px; }
.pvt-sheet input, .pvt-sheet select { min-height: 35px; padding: .4rem .5rem; border-color: transparent; border-radius: 5px; background: transparent; font-size: .78rem; }
.pvt-sheet input:hover, .pvt-sheet select:hover, .pvt-sheet input:focus, .pvt-sheet select:focus { border-color: #9fb9a6; background: #fff; }
.pvt-cell-actions { white-space: normal; }
.pvt-sheet-action { min-height: 31px; margin: .12rem; padding: .35rem .55rem; border: 1px solid #cfd8d1; border-radius: 6px; background: #fff; color: #31443a; font: inherit; font-size: .7rem; font-weight: 760; cursor: pointer; }
.pvt-sheet-action:hover { border-color: var(--pvt-accent); color: var(--pvt-accent); }
.pvt-sheet-action.is-success { border-color: #78aa87; background: #e9f6ed; color: #176238; }
.pvt-sheet-delete { border-color: #ead0d0; color: #9b3939; }
.pvt-sheet-delete:hover { border-color: #bd6666; background: #fff3f3; color: #842828; }
.pvt-sheet-action:disabled { cursor: wait; opacity: .5; }
.pvt-save-state { display: block; min-height: 1em; margin-top: .15rem; color: var(--pvt-accent); font-size: .68rem; }
.pvt-sheet-empty td { height: 180px; color: var(--pvt-muted); text-align: center; font-size: .9rem; }
.pvt-sheet-tabs { display: flex; height: 42px; padding-left: .7rem; align-items: end; gap: .2rem; border-top: 1px solid #d7ded8; background: #f2f5f2; }
.pvt-sheet-tabs span { display: grid; min-width: 110px; height: 36px; padding: 0 .8rem; place-items: center; color: #536158; font-size: .72rem; font-weight: 750; }
.pvt-sheet-tabs .is-active { border-bottom: 3px solid #217346; background: #fff; color: #155f3f; }
.pvt-sheet-tabs .pvt-sheet-add { min-width: 38px; font-size: 1.1rem; }
.pvt-save-state { color: var(--pvt-accent); font-size: .78rem; }
.pvt-pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.4rem; }
.pvt-pagination a { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--pvt-line); border-radius: 7px; color: var(--pvt-ink); text-decoration: none; }
.pvt-pagination a.is-current { border-color: var(--pvt-accent); background: var(--pvt-accent); color: #fff; }

.pvt-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.pvt-stat-card { min-height: 150px; padding: 1.2rem; box-shadow: none; }
.pvt-stat-card strong { display: block; margin-bottom: 1.6rem; color: var(--pvt-accent); font-size: 2.8rem; line-height: 1; letter-spacing: -.05em; }
.pvt-stat-card span { color: var(--pvt-muted); font-size: .83rem; font-weight: 700; }
.pvt-stat-due { border-color: #d4b35e; background: #fffaec; }
.pvt-stat-mistake-heavy { border-color: #d6a8a8; background: #fff7f7; }
.pvt-empty { padding: 3rem 1.5rem; text-align: center; }
.pvt-empty-mark { display: grid; width: 58px; height: 58px; margin: 0 auto 1rem; place-items: center; border-radius: 50%; background: #e4f0e8; color: var(--pvt-accent); font-size: 1.7rem; }

@media (max-width: 820px) {
	.pvt-library-filters { grid-template-columns: 1fr 1fr; }
	.pvt-library-filters input[type="search"] { grid-column: 1 / -1; }
	.pvt-library { width: 94vw; }
	.pvt-workbook-bar > span:last-child { display: none; }
	.pvt-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.pvt { margin: 1.2rem auto; }
	.pvt-form-grid, .pvt-library-filters { grid-template-columns: 1fr; }
	.pvt-field-wide, .pvt-library-filters input[type="search"] { grid-column: auto; }
	.pvt-card-front { min-height: 330px; padding: 1.3rem; }
	.pvt-review-word { flex-direction: column; gap: .2rem; }
	.pvt-answer-with-audio { align-items: flex-start; flex-direction: column; }
	.pvt-review-actions { grid-template-columns: 1fr; }
	.pvt-review-actions .pvt-button { min-height: 54px; }
	.pvt-sheet-scroll { max-height: 68vh; }
	.pvt-stat-card { min-height: 125px; }
}

@media (prefers-reduced-motion: reduce) {
	.pvt-button { transition: none; }
	.pvt-speech-button, .pvt-speech-button.is-speaking svg { transition: none; animation: none; }
}

@keyframes pvt-audio-pulse {
	from { transform: scale(.9); }
	to { transform: scale(1.12); }
}
