/* Standalone homework styles. Scoped to this page; no Tailwind build required. */
#homework, #hw-lightbox {font-family:inherit;color:#1e293b;font-size:14px;line-height:1.6}
#homework *, #hw-lightbox * {box-sizing:border-box}
#homework {width:100%;max-width:1280px;margin:0 auto;padding:96px 16px 64px}
#homework [hidden], #hw-lightbox [hidden] {display:none!important}
#homework svg, #hw-lightbox svg {width:16px;height:16px;flex-shrink:0}
#homework button, #hw-lightbox button {cursor:pointer;font:inherit}
#homework button:disabled {cursor:default;opacity:.3}
#homework a {text-decoration:none}
#homework :focus-visible, #hw-lightbox :focus-visible {outline:2px solid #0ea5e9;outline-offset:4px}
#homework h1, #homework h2, #homework h3, #homework p, #hw-lightbox h2, #hw-lightbox p {margin:0}
#homework>nav {display:flex;align-items:center;gap:12px;margin-bottom:24px;font-size:12px;color:#64748b}
#homework>section:first-of-type {overflow:hidden;border-radius:16px;background:#172554}
#homework>section:first-of-type a, #homework>section:first-of-type img {display:block;width:100%;aspect-ratio:3/1;object-fit:cover}
#homework>header {display:flex;flex-direction:column;gap:12px;margin:32px 0}
#homework h1 {font-size:30px;line-height:1.3;font-weight:600;letter-spacing:-.025em;color:#0f172a}
#homework>header p {margin-top:12px;font-size:14px;line-height:28px;color:#64748b}
#homework>header>a {display:inline-flex;align-items:center;align-self:flex-start;gap:8px;min-height:44px;font-size:14px;font-weight:500;color:#0284c7}
#homework section[aria-labelledby="featured-title"] {margin-bottom:48px}
#homework section[aria-labelledby="featured-title"]>div:first-child, #latest>div:first-child {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
#homework h2 {font-size:24px;line-height:1.4;font-weight:600;letter-spacing:-.02em}
#homework section[aria-labelledby="featured-title"]>div:first-child p {margin-top:4px;color:#64748b}
#homework section[aria-labelledby="featured-title"]>div:first-child>div:last-child {display:flex;gap:8px}
#hw-prev, #hw-next {display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #e2e8f0;border-radius:50%;background:#fff}
#hw-featured {display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:12px}
#homework .hw-feature-card, #homework .hw-review {position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #e2e8f0;border-radius:16px;background:#fff}
#homework .hw-feature-card {width:82%;flex-shrink:0;scroll-snap-align:start}
#homework .hw-feature-card>img {width:100%;height:192px;object-fit:cover;object-position:top}
#homework .hw-feature-card>div {position:relative;display:flex;flex:1;flex-direction:column;padding:20px}
#homework .hw-feature-card small {font-size:12px;color:#64748b}
#homework .hw-feature-card>div>div:first-of-type {display:flex;flex-wrap:wrap;gap:4px 8px;min-width:0;margin-top:4px;padding-right:56px}
#homework .hw-feature-card h3 {min-width:0;font-size:18px;font-weight:600;overflow-wrap:anywhere}
#homework .hw-feature-card>div>span {position:absolute;right:20px;top:20px;display:inline-flex;align-items:center;gap:4px;border-radius:8px;background:#fffbeb;padding:4px 8px;color:#92400e;font-weight:600}
#homework .hw-feature-card>div>span svg {fill:#fbbf24;stroke:#f59e0b}
#homework .hw-feature-card>div>p {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:16px 0 20px;font-size:14px;line-height:28px;color:#475569}
#homework .hw-feature-card>div>div:last-of-type {display:flex;justify-content:space-between;gap:8px;margin-top:auto;padding-top:12px;border-top:1px solid #f1f5f9;font-size:12px;color:#64748b}
#homework .hw-feature-card>div>a {display:inline-flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px;color:#0284c7;font-weight:500}
#homework [data-profile-badge] {position:absolute;left:0;top:0;z-index:10}
#homework [data-profile-badge] .custom-badge-container {position:relative;top:auto;left:auto;display:inline-flex;align-items:center;vertical-align:top;white-space:nowrap}
#homework [data-profile-badge] svg {width:12px;height:12px}
#latest {scroll-margin-top:96px}
#latest>div:first-child {padding-top:28px;border-top:1px solid #e2e8f0}
#hw-count {display:inline-block;margin-left:8px;border-radius:999px;background:#fdf2f8;padding:4px 10px;font-size:12px;font-weight:400;vertical-align:middle;color:#be185d}
#hw-search-form {display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}
#hw-search-form label {display:flex;align-items:center;flex:1;min-width:0;gap:8px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:0 12px;color:#94a3b8}
#hw-search-form label:focus-within {border-color:#38bdf8}
#hw-search {width:100%;min-width:0;background:transparent;border:0;padding:12px 0;color:#1e293b;font:inherit;outline:none}
#hw-search-form button, #hw-retry {min-height:44px;border:0;border-radius:12px;background:#0284c7;padding:0 16px;color:#fff;font-size:14px;font-weight:500}
#hw-sort {min-height:44px;max-width:144px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:0 12px;font:inherit}
#latest>div:nth-child(2) {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;font-size:12px;color:#64748b}
#hw-photo {display:inline-flex;align-items:center;gap:8px;min-height:44px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;padding:0 16px;font-size:12px}
#hw-photo[aria-pressed="true"] {border-color:#7dd3fc;background:#f0f9ff;color:#0369a1}
#hw-search-feedback {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:20px;border-radius:12px;background:#f0f9ff;padding:12px 16px}
#hw-search-result {overflow-wrap:anywhere;color:#075985}
#hw-clear-search {min-height:44px;flex-shrink:0;border:0;background:transparent;color:#0369a1;font-size:14px;text-decoration:underline;text-underline-offset:4px}
#homework #hw-search-help {margin-bottom:16px;font-size:12px;color:#64748b}
#homework #hw-status {border:1px dashed #cbd5e1;border-radius:16px;background:#fff;padding:56px 24px;text-align:center;color:#64748b}
#hw-retry {margin-top:16px;padding:12px 20px}
#hw-reviews {display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:20px}
#homework .hw-review {scroll-margin-top:96px}
#homework .hw-review>a {display:flex;align-items:center;gap:12px;border-bottom:1px solid #f1f5f9;background:#f5faff;padding:32px 20px 16px}
#homework .hw-review>a>img {width:56px;height:56px;flex-shrink:0;border-radius:12px;object-fit:cover;object-position:top}
#homework .hw-review>a>div {min-width:0}
#homework .hw-review>a strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:600}
#homework .hw-review>a small {display:block;margin-top:4px;font-size:12px;color:#64748b}
#homework .hw-review>div {display:flex;flex:1;flex-direction:column;padding:20px}
#homework .hw-review>div>div:first-child {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
#homework .hw-review>div>div:first-child>div:first-child {display:flex;align-items:center;min-width:0;gap:10px}
#homework .hw-review>div>div:first-child>div:first-child>span {display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex-shrink:0;border-radius:50%;background:#fdf2f8;color:#db2777;font-size:14px;font-weight:500}
#homework .hw-review>div>div:first-child strong {display:block;font-size:12px;font-weight:500}
#homework .hw-review time {display:block;margin-top:4px;font-size:11px;color:#64748b}
#homework .hw-review>div>div:first-child>div:last-child {display:flex;align-items:center;gap:8px;font-size:12px;color:#475569}
#homework .hw-review>div>div:first-child>div:last-child span {display:inline-flex;gap:2px;color:#f59e0b}
#homework .hw-review>div>div:first-child>div:last-child svg {width:12px;height:12px}
#homework .hw-review h3 {margin:16px 0 8px;font-size:16px;font-weight:500}
#homework .hw-review>div>p {margin-bottom:20px;white-space:pre-line;overflow-wrap:anywhere;font-size:14px;line-height:28px;color:#475569}
#homework .hw-thumb {display:flex;width:112px;overflow:hidden;margin:16px 0 20px;border:1px solid #f1f5f9;border-radius:12px}
#homework .hw-thumb img {width:112px;height:128px;object-fit:cover}
#homework .hw-review>div>div:last-child:not(:first-child) {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;border-top:1px solid #f1f5f9;padding-top:12px;font-size:12px}
#homework .hw-review>div>div:last-child>a, #homework .hw-review>div>div:last-child>button {display:inline-flex;align-items:center;gap:8px;min-height:44px;border:0;background:transparent;color:#64748b;font-size:12px}
#homework .hw-review>div>div:last-child>a {color:#0284c7;font-weight:500}
#latest>div:last-child {margin-top:32px;text-align:center}
#hw-more {display:inline-flex;align-items:center;gap:8px;min-height:44px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:12px 28px;font-size:14px}
#homework>p {margin-top:40px;text-align:center;font-size:12px;line-height:24px;color:#64748b}
#homework>p a {color:#0284c7}
#homework>div:last-child {display:flex;align-items:flex-start;justify-content:center;gap:12px;margin-top:24px;border-radius:12px;background:#f1f5f9;padding:20px;font-size:12px;line-height:24px;color:#64748b}
#homework>div:last-child>svg {margin-top:4px}
#homework>div:last-child strong {font-weight:500;color:#334155}
#hw-lightbox {width:calc(100% - 32px);max-width:896px;max-height:90dvh;margin:auto;overflow-y:auto;border:0;border-radius:16px;background:#fff;padding:0}
#hw-lightbox::backdrop {background:rgba(2,6,23,.75)}
#hw-lightbox header {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px}
#hw-lightbox h2 {font-weight:600}
#hw-lightbox header p {margin-top:4px;font-size:12px;color:#64748b}
#hw-image-close {display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:50%;background:#f1f5f9}
#hw-lightbox>div>div {display:flex;align-items:center;justify-content:center;min-height:256px;background:#020617;padding:12px;color:#fff}
#hw-image-full {max-height:65dvh;max-width:100%;object-fit:contain}
#hw-lightbox footer {display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:16px;font-size:12px;color:#64748b}
#hw-image-original {display:inline-flex;align-items:center;gap:8px;color:#0284c7}
@media(min-width:640px){#homework{padding-left:24px;padding-right:24px}#homework>header{flex-direction:row;align-items:flex-end;justify-content:space-between}#homework h1{font-size:36px}#homework .hw-feature-card{width:45%}#hw-search-form{width:auto}}
@media(min-width:1024px){#homework{padding-left:32px;padding-right:32px}#homework .hw-feature-card{width:calc((100% - 40px)/3)}#hw-reviews{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Existing landing badge shapes, isolated so older global CSS is sufficient. */
#homework .custom-badge-container {height:18px;padding:0 8px 0 6px;border-radius:0 8px 8px 0;font-size:10px;font-weight:500;overflow:hidden}
#homework .custom-badge-container>span {position:relative;z-index:1}
#homework .custom-badge-container svg {margin:0 4px}
#homework .badge-superstar-bg {background:#a8447c;color:#fff7ed}
#homework .badge-idol-bg {background:rgba(255,255,255,.9);color:#ec4899;box-shadow:0 2px 10px rgba(236,72,153,.3)}
#homework .badge-superstar-border::before, #homework .badge-superstar2-border::before, #homework .badge-idol-border::before {content:"";position:absolute;inset:0;border:1px solid #f9a8d4;border-radius:0 8px 8px 0;pointer-events:none}
#homework .hw-review>a {color:#1e293b}
#homework .hw-review>div>p.line-clamp-4 {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
#homework [data-expand] {display:inline-flex;align-items:center;align-self:flex-start;gap:4px;min-height:44px;margin-top:8px;padding:0;border:0;background:transparent;font-size:12px;font-weight:500;color:#0284c7}
#homework .badge-superstar2-border {background:linear-gradient(90deg,#ec4899,#fb7185);color:#fff}
#homework .hw-thumb {padding:0;background:transparent}
#homework .hw-thumb:hover {opacity:.9}
#homework .custom-badge-container.from-gray-600 {background:linear-gradient(90deg,#4b5563,#374151);color:#e5e7eb}
#homework .custom-badge-container.bg-emerald-500 {background:#10b981;color:#fff}
#homework .custom-badge-container.from-blue-600 {background:linear-gradient(90deg,#2563eb,#4f46e5);color:#fff}
#homework .custom-badge-container.from-red-500 {background:linear-gradient(90deg,#ef4444,#f97316);color:#fff}
