.task-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 4px;
}

.result-count {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 4px;
}

/* Playful brand layer: calm enough for study, lively enough to feel human. */
:root {
  --ink: #29302f;
  --forest: #405f5a;
  --green: #477d70;
  --mint: #dff1e7;
  --cream: #fff8ed;
  --line: #dfd8ce;
  --muted: #726f70;
  --orange: #f0755b;
  --red: #bd514e;
  --lilac: #e7e0f7;
  --yellow: #ffe39a;
  --blue: #dcecf4;
  --shadow: 0 10px 28px rgba(55, 45, 38, .10);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(240,117,91,.09), transparent 24rem),
    radial-gradient(circle at 92% 22%, rgba(139,122,184,.10), transparent 26rem),
    var(--cream);
}

.logo { color: #333a38; font-weight: 850; letter-spacing: -.7px; }
.logo span { background: var(--yellow); border: 2px solid currentColor; transform: rotate(-5deg); }
.login-art .logo { color: #313735; position: relative; z-index: 2; }

.login-art {
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 14%, #ffe39a 0 12%, transparent 12.2%),
    radial-gradient(circle at 12% 86%, #cae8de 0 17%, transparent 17.2%),
    linear-gradient(145deg, #f2eafa 0%, #f9d9cf 53%, #fdf0c9 100%);
}
.login-art h1 { position: relative; z-index: 2; font-weight: 500; text-shadow: 2px 2px 0 #fff7; }
.login-art h1 em { color: #d85f4b; text-decoration: underline wavy #fff 4px; text-underline-offset: 8px; }
.login-art p { color: #525655; position: relative; z-index: 2; font-weight: 600; }
.login-art .orbit { border-color: rgba(61,67,65,.16); }
.login-art .orbit:before,.login-art .orbit:after { border-color: rgba(61,67,65,.10); }
.login-art .orbit b { color: rgba(67,74,71,.26); }
.login-stickers { position: absolute; z-index: 1; width: min(680px,74%); right: -2%; bottom: 2%; filter: drop-shadow(0 12px 8px rgba(82,58,44,.15)); transform: rotate(-1deg); }

@media(min-width:901px){
  .login-art > p { position: absolute; left: 7vw; top: 105px; }
  .login-art > h1 { position: absolute; left: 7vw; top: 210px; margin: 0; }
}

.login-card { background: rgba(255,252,247,.92); }
.login-card h2,.app header h1,.hero h2,.card-head h3,.task h3,.material h3,.hw h3,dialog h2 { letter-spacing: -.5px; }
.primary { background: var(--orange); box-shadow: 0 4px 0 #c55242; transition: transform .15s,box-shadow .15s; }
.primary:hover { background: #dd684f; transform: translateY(-1px); box-shadow: 0 5px 0 #b64a3d; }
.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #b64a3d; }

.app aside { background: rgba(255,252,246,.95); }
.app header { background: rgba(255,250,242,.88); backdrop-filter: blur(12px); }
.nav-btn:hover,.nav-btn.active { background: var(--yellow); color: #40392e; }
.sidebar-note { margin: 0 7px 12px; padding: 10px 12px; background: var(--lilac); border: 1px dashed #9687bb; border-radius: 6px 13px 8px 12px; color: #655a7e; font: 700 12px/1.3 Georgia,serif; transform: rotate(-1.5deg); }
.avatar { background: var(--orange); }

.card,.task,.material,.hw,.table-wrap { background: rgba(255,255,252,.91); border: 1px solid #ded4c7; box-shadow: var(--shadow); }
.card:nth-child(3n+1),.task:nth-child(3n+1),.material:nth-child(3n+1) { border-top: 4px solid var(--orange); }
.card:nth-child(3n+2),.task:nth-child(3n+2),.material:nth-child(3n+2) { border-top: 4px solid #8c7abb; }
.card:nth-child(3n),.task:nth-child(3n),.material:nth-child(3n) { border-top: 4px solid #6aa28f; }
.task,.material,.hw { transition: transform .18s,box-shadow .18s; }
.task:hover,.material:hover,.hw:hover { transform: translateY(-3px) rotate(-.15deg); box-shadow: 0 15px 35px rgba(55,45,38,.14); }
.meta span { background: var(--blue); border: 1px solid #c7dde7; }
.badge { border: 1px solid rgba(50,60,56,.08); }

.meme-banner { position: relative; min-height: 178px; display: grid; grid-template-columns: minmax(260px,44%) 1fr; align-items: center; overflow: hidden; margin: 0 0 22px; padding: 18px 28px 18px 18px; border: 2px solid #3e4945; border-radius: 20px 13px 22px 15px; background: linear-gradient(112deg,#dceff0,#eee5fa 56%,#ffe5b0); box-shadow: 5px 6px 0 #3e4945; }
.meme-banner:after { content: "✦"; position: absolute; right: 22px; top: 12px; color: var(--orange); font-size: 28px; transform: rotate(12deg); }
.meme-banner img { width: 100%; max-height: 180px; object-fit: contain; filter: drop-shadow(0 5px 3px rgba(52,43,38,.15)); }
.meme-banner h3 { margin: 7px 0; font: 700 clamp(24px,3vw,38px)/1 Georgia,serif; letter-spacing: -1px; }
.meme-banner p { margin: 0; max-width: 540px; color: #5d6361; line-height: 1.45; }
.sticker-label { display: inline-block; padding: 5px 10px; background: white; border: 1px solid #3e4945; border-radius: 3px 8px 4px 7px; font-size: 10px; font-weight: 850; letter-spacing: 1px; text-transform: uppercase; transform: rotate(-1.5deg); }

.meme-picker { margin: 16px 0; padding: 13px; border: 1px dashed #a79989; border-radius: 14px; }
.meme-picker legend { padding: 0 6px; font-weight: 800; }
.meme-picker legend small { color: var(--muted); font-weight: 500; }
.meme-picker__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.meme-choice { position: relative; display: grid; align-content: start; gap: 5px; min-width: 0; padding: 5px; cursor: pointer; border: 2px solid transparent; border-radius: 10px; background: #fff; text-align: center; }
.meme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.meme-choice img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 7px; }
.meme-choice span { font-size: 10px; line-height: 1.2; }
.meme-choice:has(input:checked) { border-color: var(--orange); background: #fff1e8; box-shadow: 0 0 0 2px #fff inset; }
.meme-choice--none { align-content: center; min-height: 92px; background: var(--blue); }
.review-feedback { display: grid; grid-template-columns: minmax(120px,180px) 1fr; align-items: center; gap: 16px; background: #fffaf0; }
.review-meme { margin: 0; overflow: hidden; border: 6px solid white; border-bottom-width: 14px; border-radius: 5px; box-shadow: 0 5px 13px rgba(66,52,42,.17); transform: rotate(-1.5deg); }
.review-meme img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.review-meme--small { width: 58px; flex: 0 0 58px; border-width: 3px; border-bottom-width: 7px; }
.review-row { align-items: center; }
.settings-grid { max-width: 900px; }
.security-note { display: flex; align-items: flex-start; gap: 13px; background: var(--mint); }
.security-note > span { font-size: 26px; }
.security-note h3 { margin: 3px 0 8px; font: 21px Georgia,serif; }
.security-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.empty { display: grid; justify-items: center; gap: 7px; }
.empty small { display: block; color: #99918c; }
.empty-doodle { display: block; padding: 8px 12px; background: var(--yellow); color: #4c443d; border: 1px solid #bda96f; border-radius: 50%; font-weight: 850; transform: rotate(-4deg); }

@media(max-width:900px){
  .login-stickers { width: 55%; opacity: .9; right: -4%; bottom: -2%; }
  .login-art h1 { position: relative; margin-top: 38px; }
  .login-art p { max-width: 44%; font-size: 11px; line-height: 1.45; }
  .meme-banner { grid-template-columns: 118px 1fr; min-height: 132px; padding: 12px; box-shadow: 3px 4px 0 #3e4945; }
  .meme-banner img { width: 155px; max-width: none; transform: translateX(-21px); }
  .meme-banner h3 { font-size: 21px; }
  .meme-banner p { font-size: 12px; }
  .sticker-label { font-size: 8px; }
  .meme-picker__grid { grid-template-columns: repeat(2,1fr); }
  .review-feedback { grid-template-columns: 92px 1fr; }
}
