.phmath-exam-app,
.phmath-exam-app * { box-sizing: border-box; }

.phmath-exam-app {
    --ph-primary: #5b4cf0;
    --ph-primary-dark: #4435cf;
    --ph-accent: #20c997;
    --ph-ink: #16213b;
    --ph-muted: #6c7891;
    --ph-line: #e5e8f1;
    --ph-bg: #f5f6fb;
    --ph-card: #fff;
    --ph-danger: #d93651;
    --ph-shadow: 0 18px 50px rgba(28, 24, 79, .12);
    color: var(--ph-ink);
    font-family: Inter, ui-rounded, "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    isolation: isolate;
    margin: 20px auto;
    max-width: 1380px;
    position: relative;
    width: 100%;
}

.phmath-exam-app button,
.phmath-exam-app input,
.phmath-exam-app select { font: inherit; }
.phmath-exam-app button { cursor: pointer; }
.phmath-exam-app button:focus-visible,
.phmath-exam-app input:focus-visible,
.phmath-exam-app select:focus-visible,
.phmath-exam-app a:focus-visible { outline: 3px solid rgba(91, 76, 240, .28); outline-offset: 3px; }
.phmath-exam-app [hidden] { display: none !important; }

.ph-app-shell {
    background: var(--ph-bg);
    border: 1px solid rgba(91, 76, 240, .1);
    border-radius: 28px;
    box-shadow: var(--ph-shadow);
    min-height: 740px;
    overflow: hidden;
    position: relative;
}

.ph-topbar {
    align-items: center;
    background: #17133f;
    display: flex;
    justify-content: space-between;
    min-height: 78px;
    padding: 14px 28px;
}

.ph-brand {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    display: inline-flex;
    font-size: 20px;
    font-weight: 900;
    gap: 10px;
    letter-spacing: .04em;
    padding: 4px;
}
.ph-brand img { display: block; max-height: 44px; max-width: 180px; object-fit: contain; }
.ph-brand-mark { align-items: center; background: linear-gradient(135deg, #766aff, #20c997); border-radius: 13px; display: inline-flex; height: 42px; justify-content: center; width: 42px; }
.ph-top-actions { align-items: center; display: flex; gap: 10px; }

.ph-icon-button {
    align-items: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.ph-button {
    align-items: center;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    font-weight: 800;
    gap: 7px;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ph-button:hover { transform: translateY(-1px); }
.ph-button:disabled { cursor: default; opacity: .72; transform: none; }
.ph-button-primary { background: var(--ph-primary); box-shadow: 0 10px 22px rgba(91, 76, 240, .24); color: #fff; }
.ph-button-primary:hover { background: var(--ph-primary-dark); color: #fff; }
.ph-button-soft { background: #eeecff; border: 1px solid #dcd7ff; color: #4032bd; }
.ph-button-soft:hover { background: #e4e0ff; color: #30249f; }
.ph-button-lgs { background: linear-gradient(135deg, #ffca4b, #f59328); box-shadow: 0 10px 22px rgba(245, 147, 40, .22); color: #332003; }
.ph-button-lgs:hover { background: linear-gradient(135deg, #ffd66c, #f29b3c); color: #241500; }
.ph-button-danger { background: #fff0f3; border: 1px solid #ffd2da; color: #bd233e; }
.ph-button-large { border-radius: 17px; min-height: 54px; padding: 14px 22px; }
.ph-button-block { display: flex; width: 100%; }

.ph-main { min-height: 610px; }
.ph-view { animation: phFadeIn .28s ease both; }
@keyframes phFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ph-hero {
    background: radial-gradient(circle at 10% 10%, rgba(117, 104, 255, .45), transparent 30%), linear-gradient(135deg, #17133f 0%, #352978 62%, #4d3bd6 100%);
    color: #fff;
    overflow: hidden;
    padding: 66px 42px 72px;
    position: relative;
    text-align: center;
}
.ph-hero::before,
.ph-hero::after { border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; content: ""; position: absolute; }
.ph-hero::before { height: 330px; right: -110px; top: -190px; width: 330px; }
.ph-hero::after { bottom: -190px; height: 300px; left: -120px; width: 300px; }
.ph-eyebrow,
.ph-kicker { color: #6557de; display: block; font-size: 11px; font-weight: 900; letter-spacing: .14em; margin-bottom: 5px; text-transform: uppercase; }
.ph-hero .ph-eyebrow { color: #c9c4ff; }
.ph-hero h2 { color: #fff; font-size: clamp(30px, 5vw, 58px); font-weight: 950; letter-spacing: -.045em; line-height: 1.08; margin: 12px auto 14px; max-width: 850px; }
.ph-hero > p { color: #e3e0ff; font-size: clamp(16px, 2vw, 20px); margin: 0 auto 27px; max-width: 720px; }
.ph-hero-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; position: relative; z-index: 1; }
.ph-local-note { color: #d9d5ff; font-size: 13px; margin-top: 20px; }

.ph-dashboard { display: grid; gap: 22px; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); padding: 28px; }
.ph-panel,
.ph-form-card { background: var(--ph-card); border: 1px solid var(--ph-line); border-radius: 21px; box-shadow: 0 7px 24px rgba(35, 39, 74, .055); padding: 23px; }
.ph-calendar-panel { grid-column: 1 / -1; }
.ph-section-heading,
.ph-page-heading { align-items: flex-start; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 18px; }
.ph-section-heading h3,
.ph-page-heading h2 { color: var(--ph-ink); font-weight: 900; letter-spacing: -.025em; line-height: 1.2; margin: 0; }
.ph-section-heading h3 { font-size: 23px; }
.ph-page-heading h2 { font-size: clamp(26px, 4vw, 38px); }
.ph-page-heading p { color: var(--ph-muted); margin: 6px 0 0; }
.ph-link-button { background: transparent; border: 0; color: var(--ph-primary-dark); font-size: 13px; font-weight: 850; padding: 7px; }
.ph-today-date { color: var(--ph-muted); font-size: 13px; font-weight: 700; padding-top: 5px; }

.ph-exam-list { display: grid; gap: 14px; }
.ph-exam-card { --urgency: #16a477; background: #f8fffc; border: 1px solid #dbece6; border-color: color-mix(in srgb, var(--urgency) 25%, white); border-left: 5px solid var(--urgency); border-radius: 18px; padding: 17px; position: relative; }
.ph-urgency-calm { --urgency: #18a876; background: #f1fcf8; }
.ph-urgency-plan { --urgency: #e2aa17; background: #fffbec; }
.ph-urgency-near { --urgency: #ef8427; background: #fff7ef; }
.ph-urgency-urgent { --urgency: #e23d58; background: #fff3f5; }
.ph-urgency-today { --urgency: #a70d2c; background: #fff0f3; animation: phPulse 2.4s ease-in-out 3; }
.ph-urgency-past { --urgency: #8390a8; background: #f5f6f8; }
.ph-lgs-card { box-shadow: inset 0 0 0 1px rgba(245, 147, 40, .09); }
@keyframes phPulse { 50% { box-shadow: 0 0 0 7px rgba(205, 27, 62, .08); } }
.ph-exam-card-top { align-items: center; display: grid; gap: 12px; grid-template-columns: auto 1fr auto; }
.ph-subject-icon { align-items: center; background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: 15px; display: flex; font-size: 24px; height: 50px; justify-content: center; width: 50px; }
.ph-exam-title span { color: var(--urgency); display: block; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ph-exam-title h4 { color: var(--ph-ink); font-size: 17px; font-weight: 900; line-height: 1.25; margin: 2px 0; }
.ph-exam-title time { color: var(--ph-muted); font-size: 12px; }
.ph-count { text-align: right; }
.ph-count strong { color: var(--urgency); display: block; font-size: 24px; font-weight: 950; letter-spacing: -.04em; line-height: 1; }
.ph-count small { color: var(--ph-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ph-exam-message { color: #465269; font-size: 12px; margin: 12px 0 0; }
.ph-topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ph-topic-chip { background: #fff; border: 1px solid #dde2ec; border-radius: 99px; color: #4b566b; font-size: 11px; font-weight: 750; min-height: 29px; padding: 4px 9px; }
.ph-topic-learned { background: #edf9f3; border-color: #bce9d5; color: #167052; }
.ph-topic-working { background: #fff8df; border-color: #f6dc83; color: #765b08; }
.ph-card-actions { align-items: center; border-top: 1px solid rgba(0, 0, 0, .07); display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; }
.ph-card-actions button { background: transparent; border: 0; color: #4b5872; font-size: 11px; font-weight: 800; padding: 5px 7px; }
.ph-card-actions .ph-text-danger { color: var(--ph-danger); margin-left: auto; }

.ph-empty-state { color: var(--ph-muted); padding: 28px 15px; text-align: center; }
.ph-empty-state > span { display: block; font-size: 38px; margin-bottom: 7px; }
.ph-empty-state h3,
.ph-empty-state h4 { color: var(--ph-ink); font-size: 19px; font-weight: 900; margin: 0 0 7px; }
.ph-empty-state p { margin: 0 auto 15px; max-width: 430px; }

.ph-task-group { border: 1px solid var(--ph-line); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.ph-task-group-title { align-items: center; background: #f7f7fc; display: flex; justify-content: space-between; padding: 10px 13px; }
.ph-task-group-title strong { font-size: 13px; }
.ph-task-group-title span { color: var(--ph-primary-dark); font-size: 12px; font-weight: 850; }
.ph-task { align-items: flex-start; background: #fff; border-top: 1px solid #eff0f5; cursor: pointer; display: flex; gap: 9px; margin: 0; padding: 11px 13px; position: relative; }
.ph-task:first-of-type { border-top: 0; }
.ph-task:hover { background: #fbfbfe; }
.ph-task input { opacity: 0; position: absolute; }
.ph-checkmark { align-items: center; border: 2px solid #c8cfdd; border-radius: 7px; display: flex; flex: 0 0 auto; height: 22px; justify-content: center; margin-top: 1px; width: 22px; }
.ph-task input:checked + .ph-checkmark { background: var(--ph-accent); border-color: var(--ph-accent); }
.ph-task input:checked + .ph-checkmark::after { color: #fff; content: "✓"; font-size: 14px; font-weight: 950; }
.ph-task-icon { font-size: 17px; line-height: 22px; }
.ph-task-copy { display: grid; gap: 2px; }
.ph-task-copy strong { color: #26324b; font-size: 12px; }
.ph-task-copy small { color: #68748b; font-size: 11px; line-height: 1.38; }
.ph-task.is-complete { background: #f3fbf7; }
.ph-task.is-complete .ph-task-copy { opacity: .68; text-decoration: line-through; }
.ph-task.is-bonus { background: #fffaf0; }
.ph-day-message { background: #fff7dc; border: 1px solid #f4dea0; border-radius: 12px; color: #675216; font-size: 12px; margin: 0 0 12px; padding: 10px 12px; }
.ph-day-total { align-items: center; color: var(--ph-muted); display: flex; font-size: 12px; justify-content: space-between; margin: 12px 2px; }
.ph-day-total strong { color: var(--ph-primary-dark); }
.ph-adjust-actions { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.ph-adjust-actions button { background: transparent; border: 1px solid var(--ph-line); border-radius: 12px; color: #4e5b73; font-size: 11px; font-weight: 800; min-height: 40px; padding: 8px; }
.ph-adjust-actions button:hover { background: #f7f7fc; border-color: #cbc5ff; }

.ph-calendar-strip { display: grid; gap: 9px; grid-template-columns: repeat(10, minmax(76px, 1fr)); overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.ph-calendar-day { background: #f8f9fc; border: 1px solid var(--ph-line); border-radius: 15px; color: var(--ph-muted); display: grid; min-height: 94px; padding: 9px 7px; place-items: center; }
.ph-calendar-day span { font-size: 11px; font-weight: 750; }
.ph-calendar-day strong { color: var(--ph-ink); font-size: 23px; line-height: 1; }
.ph-calendar-day small { font-size: 10px; }
.ph-calendar-day.is-today { background: #eeecff; border-color: #bbb3ff; }
.ph-calendar-day.is-complete { background: #eefbf5; border-color: #aee5ce; }

.ph-view-plan,
.ph-view-add,
.ph-view-settings { padding: 34px 28px 38px; }
.ph-page-heading { align-items: center; }
.ph-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-progress-card { background: linear-gradient(135deg, #221b59, #5644df); border-radius: 19px; box-shadow: 0 12px 28px rgba(64, 50, 189, .18); color: #fff; margin-bottom: 20px; padding: 20px 23px; }
.ph-progress-card > div:first-child { align-items: center; display: flex; justify-content: space-between; }
.ph-progress-card strong { font-size: 27px; }
.ph-progress-card small { color: #dedbff; }
.ph-progress { background: rgba(255, 255, 255, .2); border-radius: 99px; height: 10px; margin: 10px 0 7px; overflow: hidden; }
.ph-progress span { background: linear-gradient(90deg, #20c997, #92f2ce); border-radius: inherit; display: block; height: 100%; transition: width .45s ease; }
.ph-plan-days { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-plan-day { background: #fff; border: 1px solid var(--ph-line); border-radius: 19px; break-inside: avoid; box-shadow: 0 7px 22px rgba(35, 39, 74, .045); padding: 17px; }
.ph-plan-day.is-complete { border-color: #a9dec8; box-shadow: inset 0 0 0 2px #e4f7ef; }
.ph-plan-day.is-rest { background: #f5fbf8; }
.ph-plan-day-head { align-items: center; border-bottom: 1px solid var(--ph-line); display: flex; justify-content: space-between; margin-bottom: 12px; padding-bottom: 11px; }
.ph-plan-day-head span { display: block; font-size: 14px; font-weight: 900; }
.ph-plan-day-head em { background: #eeecff; border-radius: 99px; color: #4d3dce; display: inline-block; font-size: 9px; font-style: normal; font-weight: 850; margin-top: 4px; padding: 3px 7px; text-transform: uppercase; }
.ph-plan-day-head > strong { color: var(--ph-primary-dark); font-size: 12px; }
.ph-plan-day > .ph-task { border: 1px solid var(--ph-line); border-radius: 13px; margin-bottom: 7px; }
.ph-plan-day > .ph-button { margin-top: 7px; width: 100%; }
.ph-rest-copy { color: var(--ph-muted); font-size: 13px; margin: 16px 0; text-align: center; }

.ph-form-card { margin: 0 auto; max-width: 980px; padding: clamp(20px, 4vw, 34px); }
.ph-form-heading { margin-bottom: 22px; }
.ph-form-heading h2 { color: var(--ph-ink); font-size: 29px; font-weight: 950; margin: 2px 0 5px; }
.ph-form-heading p { color: var(--ph-muted); margin: 0; }
.ph-fieldset { border: 0; margin: 0 0 21px; min-width: 0; padding: 0; }
.ph-fieldset legend { color: var(--ph-ink); font-size: 14px; font-weight: 900; margin-bottom: 10px; padding: 0; }
.ph-field { color: #46516a; display: grid; font-size: 12px; font-weight: 850; gap: 6px; }
.ph-field small,
.ph-lgs-subject label small { color: var(--ph-muted); font-weight: 500; }
.ph-field input,
.ph-topic-row input,
.ph-topic-row select,
.ph-lgs-subject input,
.ph-lgs-subject select { background: #fff; border: 1px solid #ccd3e0; border-radius: 12px; color: var(--ph-ink); min-height: 46px; padding: 10px 12px; width: 100%; }
.ph-field input:focus,
.ph-topic-row input:focus,
.ph-topic-row select:focus,
.ph-lgs-subject input:focus,
.ph-lgs-subject select:focus { border-color: var(--ph-primary); box-shadow: 0 0 0 3px rgba(91, 76, 240, .1); outline: 0; }
.ph-form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-bottom: 21px; }
.ph-subject-grid { display: grid; gap: 9px; grid-template-columns: repeat(4, 1fr); }
.ph-subject-card { background: #f8f9fc; border: 1px solid var(--ph-line); border-radius: 14px; color: #45516a; display: grid; font-size: 11px; font-weight: 850; gap: 2px; min-height: 73px; padding: 8px; place-items: center; }
.ph-subject-card span { font-size: 22px; }
.ph-subject-card.is-selected { background: #eeecff; border-color: #aaa0ff; box-shadow: inset 0 0 0 1px #aaa0ff; color: #3e30b6; }
.ph-custom-subject-wrap { margin-top: 12px; }
.ph-help { color: var(--ph-muted); font-size: 11px; margin: -5px 0 10px; }
.ph-topic-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.ph-topic-row { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(0, 1.35fr) minmax(175px, .65fr) 36px; }
.ph-remove-topic { align-items: center; background: #fff0f3; border: 0; border-radius: 10px; color: var(--ph-danger); display: flex; font-size: 21px; height: 36px; justify-content: center; width: 36px; }
.ph-form-submit { border-top: 1px solid var(--ph-line); display: flex; justify-content: flex-end; margin-top: 23px; padding-top: 20px; }

.ph-create-options { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin: 0 auto 18px; max-width: 980px; }
.ph-create-option { align-items: center; background: #fff; border: 1px solid var(--ph-line); border-radius: 18px; color: var(--ph-ink); display: grid; gap: 2px; grid-template-columns: auto 1fr; min-height: 90px; padding: 15px 18px; text-align: left; }
.ph-create-option > span { font-size: 31px; grid-row: 1 / 3; margin-right: 8px; }
.ph-create-option strong { font-size: 16px; }
.ph-create-option small { color: var(--ph-muted); }
.ph-create-option:hover { border-color: #bcb5ff; box-shadow: 0 8px 22px rgba(91, 76, 240, .09); }
.ph-create-option-lgs { background: #fffaf0; border-color: #f3d69a; }

.ph-lgs-intro { align-items: center; background: linear-gradient(135deg, #fff8dc, #fff3d9); border: 1px solid #f2d28d; border-radius: 15px; display: flex; gap: 12px; margin-bottom: 19px; padding: 13px 15px; }
.ph-lgs-intro > span { font-size: 28px; }
.ph-lgs-intro strong,
.ph-lgs-intro small { display: block; }
.ph-lgs-intro small { color: #7a6331; margin-top: 2px; }
.ph-lgs-subjects { display: grid; gap: 10px; }
.ph-lgs-subject { align-items: end; background: #fafbfe; border: 1px solid var(--ph-line); border-radius: 15px; display: grid; gap: 9px; grid-template-columns: 1.2fr .9fr .62fr .62fr; padding: 12px; }
.ph-lgs-subject-title { align-items: center; display: grid; gap: 1px 8px; grid-template-columns: auto 1fr; padding-bottom: 8px; }
.ph-lgs-subject-title > span { font-size: 23px; grid-row: 1 / 3; }
.ph-lgs-subject-title strong { font-size: 13px; }
.ph-lgs-subject-title small { color: var(--ph-muted); font-size: 10px; }
.ph-lgs-subject label { color: #59657c; display: grid; font-size: 10px; font-weight: 800; gap: 3px; }
.ph-lgs-subject input,
.ph-lgs-subject select { font-size: 12px; min-height: 41px; padding: 8px 9px; }
.ph-lgs-focus { grid-column: 1 / -1; }
.ph-lgs-note { background: #f1f0ff; border-radius: 13px; color: #554a91; font-size: 12px; padding: 11px 13px; }

.ph-settings-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.ph-settings-grid .ph-form-card { margin: 0; }
.ph-settings-grid h3 { font-size: 21px; font-weight: 900; margin: 0 0 17px; }
.ph-setting-minutes { accent-color: var(--ph-primary); }
.ph-fieldset + .ph-switch { margin-top: -5px; }
.ph-study-days { display: grid; gap: 7px; grid-template-columns: repeat(7, 1fr); }
.ph-study-days label { cursor: pointer; }
.ph-study-days input { opacity: 0; position: absolute; }
.ph-study-days span { align-items: center; background: #f8f9fc; border: 1px solid var(--ph-line); border-radius: 11px; color: var(--ph-muted); display: flex; font-size: 11px; font-weight: 850; height: 43px; justify-content: center; }
.ph-study-days input:checked + span { background: #eeecff; border-color: #aaa0ff; color: #3e30b6; }
.ph-switch { align-items: center; color: #46516a; cursor: pointer; display: flex; font-size: 13px; font-weight: 800; gap: 9px; margin-bottom: 18px; }
.ph-switch input { opacity: 0; position: absolute; }
.ph-switch span { background: #cfd5e0; border-radius: 99px; display: block; height: 25px; position: relative; transition: .2s; width: 44px; }
.ph-switch span::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); content: ""; height: 19px; left: 3px; position: absolute; top: 3px; transition: .2s; width: 19px; }
.ph-switch input:checked + span { background: var(--ph-primary); }
.ph-switch input:checked + span::after { transform: translateX(19px); }
.ph-stack-actions { display: grid; gap: 9px; margin: 18px 0; }
.ph-muted { color: var(--ph-muted); font-size: 12px; }

.ph-modal[hidden] { display: none; }
.ph-modal { align-items: center; display: flex; inset: 0; justify-content: center; padding: 22px; position: fixed; z-index: 999999; }
.ph-modal-backdrop { background: rgba(12, 10, 35, .72); inset: 0; position: absolute; }
.ph-modal-card { animation: phModalIn .23s ease both; background: #fff; border-radius: 22px; box-shadow: 0 28px 90px rgba(0,0,0,.3); max-height: calc(100vh - 44px); max-width: 590px; overflow: auto; padding: 30px; position: relative; width: 100%; z-index: 1; }
.ph-modal-wide { max-width: 980px; }
.ph-modal-close { align-items: center; background: #eff1f6; border: 0; border-radius: 50%; color: #445069; display: flex; font-size: 23px; height: 38px; justify-content: center; position: absolute; right: 14px; top: 14px; width: 38px; z-index: 2; }
.ph-modal-icon { display: block; font-size: 42px; }
.ph-modal-card > h2 { font-size: 26px; font-weight: 950; margin: 8px 0 15px; }
.ph-clean-list { display: grid; gap: 9px; list-style: none; margin: 0 0 16px; padding: 0; }
.ph-clean-list li { background: #f7f8fb; border-radius: 11px; color: #455169; font-size: 13px; padding: 9px 11px; }
@keyframes phModalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.ph-modal-open { overflow: hidden; }

.ph-wizard-card { max-width: 680px; padding-top: 39px; }
.ph-wizard-progress { background: #eceef4; border-radius: 99px; height: 6px; left: 30px; overflow: hidden; position: absolute; right: 70px; top: 20px; }
.ph-wizard-progress span { background: linear-gradient(90deg, var(--ph-primary), var(--ph-accent)); display: block; height: 100%; transition: width .3s ease; }
.ph-chat { align-items: flex-start; display: grid; gap: 10px; grid-template-columns: auto 1fr; }
.ph-coach-avatar { align-items: center; background: linear-gradient(135deg, #5b4cf0, #20c997); border-radius: 15px; display: flex; font-size: 25px; height: 50px; justify-content: center; width: 50px; }
.ph-chat-bubble { background: #f5f4ff; border: 1px solid #e1ddff; border-radius: 5px 18px 18px 18px; padding: 16px 17px; }
.ph-chat-bubble h2 { color: var(--ph-ink); font-size: 21px; font-weight: 950; line-height: 1.25; margin: 2px 0 6px; }
.ph-chat-bubble p { color: var(--ph-muted); font-size: 13px; margin: 0; }
.ph-wizard-summary { background: #f8f9fc; border-radius: 13px; color: #536079; font-size: 13px; font-weight: 750; margin: 16px 0; padding: 12px; text-align: center; }
.ph-wizard-buttons { display: flex; gap: 9px; justify-content: flex-end; margin-top: 18px; }
.ph-wizard-buttons-stack { display: grid; }
.ph-duration-grid { display: grid; gap: 9px; grid-template-columns: repeat(3, 1fr); margin-top: 19px; }
.ph-duration-grid button,
.ph-choice-grid button { background: #fff; border: 1px solid #d9deea; border-radius: 14px; color: #46516a; font-weight: 850; min-height: 52px; padding: 10px; }
.ph-duration-grid button:hover,
.ph-duration-grid button.is-selected,
.ph-choice-grid button:hover { background: #eeecff; border-color: #aaa0ff; color: #392db0; }
.ph-slider-field { color: #536079; display: grid; font-size: 12px; font-weight: 800; gap: 7px; margin-top: 16px; }
.ph-slider-field input { accent-color: var(--ph-primary); width: 100%; }
.ph-days-grid { display: grid; gap: 7px; grid-template-columns: repeat(7, 1fr); margin-top: 19px; }
.ph-days-grid button { background: #f8f9fc; border: 1px solid var(--ph-line); border-radius: 12px; color: var(--ph-muted); display: grid; font-size: 11px; font-weight: 850; min-height: 59px; place-items: center; }
.ph-days-grid button span { color: transparent; font-size: 12px; }
.ph-days-grid button.is-selected { background: #eeecff; border-color: #aaa0ff; color: #3d30b6; }
.ph-days-grid button.is-selected span { color: var(--ph-accent); }
.ph-choice-grid { display: grid; gap: 9px; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.ph-choice-grid button { display: grid; place-items: center; }
.ph-choice-grid button span { font-size: 28px; }

.ph-footer { background: #17133f; color: #aaa5d5; font-size: 11px; padding: 17px 28px 88px; text-align: center; }
.ph-footer a { color: #ddd9ff; font-weight: 800; text-decoration: none; }
.ph-bottom-nav { align-items: stretch; background: rgba(255, 255, 255, .96); border: 1px solid var(--ph-line); border-radius: 18px; bottom: 14px; box-shadow: 0 12px 35px rgba(25, 24, 54, .17); display: grid; grid-template-columns: repeat(4, 1fr); left: 50%; max-width: 520px; padding: 6px; position: absolute; transform: translateX(-50%); width: calc(100% - 28px); z-index: 20; }
.ph-bottom-nav button { background: transparent; border: 0; border-radius: 13px; color: #788399; display: grid; font-size: 10px; font-weight: 850; gap: 1px; min-height: 52px; place-items: center; }
.ph-bottom-nav button span { font-size: 19px; }
.ph-bottom-nav button.is-active { background: #eeecff; color: #4032bd; }

.ph-toast-region { display: grid; gap: 8px; max-width: 430px; position: fixed; right: 20px; top: 20px; width: calc(100% - 40px); z-index: 1000001; }
.ph-toast { background: #18223b; border-left: 5px solid var(--ph-accent); border-radius: 13px; box-shadow: 0 15px 40px rgba(0,0,0,.2); color: #fff; font-size: 13px; font-weight: 750; opacity: 0; padding: 13px 15px; transform: translateY(-8px); transition: .24s ease; }
.ph-toast.is-visible { opacity: 1; transform: none; }
.ph-toast-error { border-left-color: #ff5d75; }
.ph-toast-info { border-left-color: #6ca9ff; }
.ph-confetti { animation: phConfetti 1.45s cubic-bezier(.1,.7,.25,1) var(--delay) both; background: var(--color); border-radius: 2px; height: 10px; position: absolute; top: 34%; width: 7px; z-index: 50; }
@keyframes phConfetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(280px) rotate(720deg); } }

@media (max-width: 980px) {
    .ph-dashboard { grid-template-columns: 1fr; }
    .ph-calendar-panel { grid-column: auto; }
    .ph-plan-days { grid-template-columns: 1fr; }
    .ph-lgs-subject { grid-template-columns: 1fr 1fr 1fr; }
    .ph-lgs-subject-title { grid-column: 1 / -1; }
    .ph-lgs-focus { grid-column: 1 / -1; }
    .ph-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .phmath-exam-app { margin: 0 auto; }
    .ph-app-shell { border-radius: 0; min-height: 100vh; }
    .ph-topbar { min-height: 64px; padding: 10px 14px; }
    .ph-brand { font-size: 16px; }
    .ph-brand-mark { border-radius: 10px; height: 37px; width: 37px; }
    .ph-top-actions .ph-button { font-size: 11px; line-height: 1.2; min-height: 43px; padding: 8px 11px; }
    .ph-top-actions .ph-button-lgs { display: none; }
    .ph-icon-button { height: 43px; width: 43px; }
    .ph-hero { padding: 48px 18px 55px; }
    .ph-hero h2 { font-size: 34px; }
    .ph-hero > p { font-size: 15px; }
    .ph-hero-actions { display: grid; }
    .ph-hero-actions .ph-button { width: 100%; }
    .ph-dashboard,
    .ph-view-plan,
    .ph-view-add,
    .ph-view-settings { padding: 17px 13px 28px; }
    .ph-panel { border-radius: 18px; padding: 17px; }
    .ph-section-heading h3 { font-size: 20px; }
    .ph-exam-card { padding: 14px; }
    .ph-exam-card-top { grid-template-columns: auto 1fr; }
    .ph-count { align-items: baseline; display: flex; gap: 5px; grid-column: 1 / -1; justify-content: flex-end; }
    .ph-count strong { font-size: 21px; }
    .ph-count small { font-size: 9px; }
    .ph-adjust-actions { grid-template-columns: 1fr; }
    .ph-page-heading { display: block; }
    .ph-page-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 13px; }
    .ph-page-actions .ph-button { font-size: 11px; padding: 9px; }
    .ph-form-card { border-radius: 18px; padding: 18px 14px; }
    .ph-form-heading { padding-right: 28px; }
    .ph-form-heading h2 { font-size: 24px; }
    .ph-form-grid { grid-template-columns: 1fr; }
    .ph-subject-grid { grid-template-columns: repeat(2, 1fr); }
    .ph-topic-row { grid-template-columns: 1fr 38px; }
    .ph-topic-row select { grid-column: 1; grid-row: 2; }
    .ph-remove-topic { grid-column: 2; grid-row: 1 / 3; }
    .ph-form-submit .ph-button { width: 100%; }
    .ph-create-options { grid-template-columns: 1fr; }
    .ph-lgs-subject { grid-template-columns: 1fr 1fr; }
    .ph-lgs-subject label:first-of-type { grid-column: 1 / -1; }
    .ph-lgs-focus { grid-column: 1 / -1; }
    .ph-study-days { gap: 4px; }
    .ph-study-days span { font-size: 9px; }
    .ph-modal { align-items: flex-end; padding: 0; }
    .ph-modal-card { border-radius: 22px 22px 0 0; max-height: 93vh; padding: 28px 15px 22px; }
    .ph-wizard-progress { left: 15px; }
    .ph-chat-bubble h2 { font-size: 18px; }
    .ph-wizard-buttons { display: grid; }
    .ph-duration-grid { grid-template-columns: repeat(2, 1fr); }
    .ph-days-grid { grid-template-columns: repeat(4, 1fr); }
    .ph-choice-grid { grid-template-columns: repeat(2, 1fr); }
    .ph-bottom-nav { bottom: 8px; }
    .ph-footer { padding-bottom: 82px; }
}

@media (prefers-reduced-motion: reduce) {
    .phmath-exam-app *,
    .phmath-exam-app *::before,
    .phmath-exam-app *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/*
 * TEMA UYUMLULUK KALKANI
 * Bazı WordPress temaları buton metnini yalnız :hover durumunda görünür
 * yapıyor veya metne background-clip:text uyguluyor. Aşağıdaki kurallar
 * uygulamadaki her butonun normal, hover, focus ve active durumunda okunur
 * kalmasını garanti eder.
 */
.phmath-exam-app button,
.phmath-exam-app button:hover,
.phmath-exam-app button:focus,
.phmath-exam-app button:active,
.phmath-exam-app .ph-button,
.phmath-exam-app .ph-button:hover,
.phmath-exam-app .ph-button:focus,
.phmath-exam-app .ph-button:active,
.phmath-exam-app label.ph-button {
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    color: #26324b !important;
    -webkit-text-fill-color: currentColor !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    visibility: visible !important;
}

.phmath-exam-app button *,
.phmath-exam-app .ph-button * {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.phmath-exam-app .ph-brand,
.phmath-exam-app .ph-brand:hover,
.phmath-exam-app .ph-brand:focus,
.phmath-exam-app .ph-icon-button,
.phmath-exam-app .ph-icon-button:hover,
.phmath-exam-app .ph-icon-button:focus,
.phmath-exam-app .ph-button-primary,
.phmath-exam-app .ph-button-primary:hover,
.phmath-exam-app .ph-button-primary:focus,
.phmath-exam-app .ph-button-primary:active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.phmath-exam-app .ph-brand,
.phmath-exam-app .ph-brand:hover,
.phmath-exam-app .ph-brand:focus {
    background: transparent !important;
}

.phmath-exam-app .ph-icon-button,
.phmath-exam-app .ph-icon-button:hover,
.phmath-exam-app .ph-icon-button:focus {
    background: rgba(255, 255, 255, .1) !important;
}

.phmath-exam-app .ph-button-primary,
.phmath-exam-app .ph-button-primary:focus,
.phmath-exam-app .ph-button-primary:active {
    background: var(--ph-primary) !important;
}

.phmath-exam-app .ph-button-primary:hover {
    background: var(--ph-primary-dark) !important;
}

.phmath-exam-app .ph-button-lgs,
.phmath-exam-app .ph-button-lgs:hover,
.phmath-exam-app .ph-button-lgs:focus,
.phmath-exam-app .ph-button-lgs:active {
    background: linear-gradient(135deg, #ffca4b, #f59328) !important;
    color: #332003 !important;
    -webkit-text-fill-color: #332003 !important;
}

.phmath-exam-app .ph-button-soft,
.phmath-exam-app .ph-button-soft:hover,
.phmath-exam-app .ph-button-soft:focus,
.phmath-exam-app .ph-button-soft:active,
.phmath-exam-app label.ph-button-soft {
    background: #eeecff !important;
    border-color: #dcd7ff !important;
    color: #4032bd !important;
    -webkit-text-fill-color: #4032bd !important;
}

.phmath-exam-app .ph-button-danger,
.phmath-exam-app .ph-button-danger:hover,
.phmath-exam-app .ph-button-danger:focus {
    background: #fff0f3 !important;
    color: #bd233e !important;
    -webkit-text-fill-color: #bd233e !important;
}

.phmath-exam-app .ph-link-button,
.phmath-exam-app .ph-link-button:hover,
.phmath-exam-app .ph-link-button:focus {
    background: transparent !important;
    color: #4032bd !important;
    -webkit-text-fill-color: #4032bd !important;
}

.phmath-exam-app .ph-card-actions button,
.phmath-exam-app .ph-card-actions button:hover,
.phmath-exam-app .ph-card-actions button:focus,
.phmath-exam-app .ph-adjust-actions button,
.phmath-exam-app .ph-adjust-actions button:hover,
.phmath-exam-app .ph-adjust-actions button:focus {
    color: #46516a !important;
    -webkit-text-fill-color: #46516a !important;
}

.phmath-exam-app .ph-card-actions button,
.phmath-exam-app .ph-card-actions button:hover,
.phmath-exam-app .ph-card-actions button:focus {
    background: transparent !important;
}

.phmath-exam-app .ph-adjust-actions button,
.phmath-exam-app .ph-adjust-actions button:focus {
    background: #fff !important;
}

.phmath-exam-app .ph-adjust-actions button:hover {
    background: #f7f7fc !important;
}

.phmath-exam-app .ph-card-actions .ph-text-danger,
.phmath-exam-app .ph-card-actions .ph-text-danger:hover,
.phmath-exam-app .ph-card-actions .ph-text-danger:focus {
    color: #bd233e !important;
    -webkit-text-fill-color: #bd233e !important;
}

.phmath-exam-app .ph-subject-card,
.phmath-exam-app .ph-calendar-day,
.phmath-exam-app .ph-create-option,
.phmath-exam-app .ph-duration-grid button,
.phmath-exam-app .ph-choice-grid button,
.phmath-exam-app .ph-days-grid button,
.phmath-exam-app .ph-topic-chip,
.phmath-exam-app .ph-bottom-nav button {
    color: #46516a !important;
    -webkit-text-fill-color: #46516a !important;
}

.phmath-exam-app .ph-subject-card,
.phmath-exam-app .ph-calendar-day,
.phmath-exam-app .ph-days-grid button {
    background: #f8f9fc !important;
}

.phmath-exam-app .ph-create-option,
.phmath-exam-app .ph-duration-grid button,
.phmath-exam-app .ph-choice-grid button,
.phmath-exam-app .ph-topic-chip {
    background: #fff !important;
}

.phmath-exam-app .ph-create-option-lgs {
    background: #fffaf0 !important;
}

.phmath-exam-app .ph-bottom-nav button {
    background: transparent !important;
}

.phmath-exam-app .ph-subject-card.is-selected,
.phmath-exam-app .ph-duration-grid button.is-selected,
.phmath-exam-app .ph-days-grid button.is-selected,
.phmath-exam-app .ph-bottom-nav button.is-active {
    background: #eeecff !important;
    color: #3e30b6 !important;
    -webkit-text-fill-color: #3e30b6 !important;
}

.phmath-exam-app .ph-topic-learned {
    background: #edf9f3 !important;
    color: #167052 !important;
    -webkit-text-fill-color: #167052 !important;
}

.phmath-exam-app .ph-topic-working {
    background: #fff8df !important;
    color: #765b08 !important;
    -webkit-text-fill-color: #765b08 !important;
}

.phmath-exam-app .ph-subject-card.is-selected,
.phmath-exam-app .ph-duration-grid button.is-selected,
.phmath-exam-app .ph-days-grid button.is-selected {
    background: #eeecff !important;
}

.phmath-exam-app .ph-remove-topic,
.phmath-exam-app .ph-remove-topic:hover,
.phmath-exam-app .ph-remove-topic:focus {
    background: #fff0f3 !important;
    color: #bd233e !important;
    -webkit-text-fill-color: #bd233e !important;
}

@media (max-width: 680px) {
    .phmath-exam-app .ph-top-actions .ph-button {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
}
