/* ---------- report list ---------- */
.reports { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rep-card { --i: 0; position: relative; display: flex; flex-direction: column; gap: .8rem; padding: 1.1rem; background: #fff; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.rep-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.rep-top { display: flex; align-items: center; gap: .8rem; }
.rep-top .avatar { width: 48px; height: 48px; border-radius: 16px; font-size: 1.1rem; }
.rep-name { font-family: 'Fredoka Variable', 'Fredoka', sans-serif; font-weight: 600; font-size: 1.1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.rep-name:hover { color: var(--primary); }
.rep-meta { font-size: .82rem; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: .1rem .6rem; }
.rep-actions { display: flex; gap: .15rem; margin: 0 -.35rem -.35rem; }
.rep-actions .btn { margin-right: auto; }

/* ---------- editor layout ---------- */
.main.wide { max-width: none; }
.ed-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: -2rem calc(-1 * clamp(1rem, 3vw, 2.75rem)) 1.25rem; padding: .7rem clamp(1rem, 3vw, 2.75rem); background: rgba(246, 244, 255, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.ed-bar h1 { font-size: 1.25rem; flex: 1; min-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-bar .dirty { font-size: .8rem; font-weight: 800; color: #a66a00; background: #fff3cf; padding: .1rem .6rem; border-radius: 99px; }
.meter { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: .82rem; color: var(--ink-2); }
.meter-track { width: 90px; height: 10px; border-radius: 99px; background: #e4e0fa; overflow: hidden; }
.meter-track i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad-mint); transition: width .4s var(--ease); }
.ed-tabs { display: none; }
.ed { display: grid; grid-template-columns: minmax(380px, 540px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ed-form { display: grid; gap: 1.1rem; min-width: 0; }
.ed-preview { position: sticky; top: 4.6rem; max-height: calc(100vh - 5.6rem); overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; overscroll-behavior: contain; padding: .75rem; border-radius: 22px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); }
.ed-preview-head { display: flex; align-items: center; gap: .6rem; padding: 0 .25rem .6rem; font-weight: 800; color: var(--ink-2); }
.ed-preview-head span { flex: 1; }
.preview-modal { width: min(940px, 100%); background: #eceaf8; }

/* ---------- editor cards ---------- */
.ed-card { padding: 1.3rem 1.3rem 1.1rem; animation: rise .45s var(--ease) both; }
.ed-card > h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: 1.2rem; }
.ed-card > h2 small { margin-left: auto; font-family: 'Nunito Variable', sans-serif; font-weight: 700; font-size: .8rem; color: var(--muted); }
.ed-card .field { margin-bottom: .85rem; }
.ed-card .field:last-child { margin-bottom: 0; }
.req { color: var(--coral); }
.gender { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.gender-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 54px; border: 2px solid var(--line); background: #fbfaff; border-radius: 16px; font: inherit; font-weight: 800; color: var(--ink-2); cursor: pointer; transition: all .18s var(--ease); }
.gender-btn span { font-size: 1.6rem; line-height: 1; }
.gender-btn:hover { border-color: #d7d2fa; transform: translateY(-2px); }
.gender-btn[aria-checked='true'] { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); box-shadow: 0 6px 16px rgba(88, 72, 214, .18); }
.date-chip { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem; border-radius: 16px; background: linear-gradient(135deg, #e0f2ff, #e6fff6); color: #0b6e53; font-weight: 800; }
.date-chip svg { width: 20px; height: 20px; flex: none; color: #1c7ed6; }
.date-chip .pill { margin-left: auto; }
.field-error { box-shadow: 0 0 0 4px rgba(255, 107, 129, .22) !important; border-color: var(--coral) !important; }

/* level ladder */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.level-tile { position: relative; display: grid; gap: .1rem; justify-items: center; text-align: center; padding: .65rem .3rem .6rem; border: 2px solid var(--line); background: #fbfaff; border-radius: 16px; font: inherit; color: var(--ink-2); cursor: pointer; transition: all .18s var(--ease); }
.level-tile::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 5px; border-radius: 0 0 6px 6px; background: var(--lc); opacity: .7; }
.level-tile b { font-family: 'Fredoka Variable', 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.level-tile span { font-size: .78rem; font-weight: 800; line-height: 1.2; }
.level-tile:hover { transform: translateY(-3px); border-color: var(--lc); }
.level-tile[aria-checked='true'] { border-color: var(--lc); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc) 28%, transparent), var(--shadow-sm); transform: translateY(-3px); }
.level-tile[aria-checked='true']::after { content: '✓'; position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 900; color: #1e2250; background: var(--lc); }
.level-hint { margin-top: .8rem; padding: .7rem .9rem; border-radius: 14px; background: #faf9ff; border: 1px dashed #d7d2fa; font-size: .88rem; color: var(--ink-2); font-weight: 600; }

/* section cards */
.sec-card { --acc: #6c5ce7; --acc-soft: #efecff; padding: 1rem 1.1rem 1.1rem; border-radius: 22px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--acc); box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.sec-card:focus-within { box-shadow: var(--shadow); }
.sec-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.sec-emoji { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--acc-soft); font-size: 1.3rem; }
.sec-head h3 { flex: 1; min-width: 120px; font-size: 1.05rem; }
.sec-done { display: none; font-size: .75rem; }
.sec-card.done .sec-done { display: inline-flex; }
.star-row { display: inline-flex; gap: 1px; }
.star-btn { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-size: 1.45rem; line-height: 1; color: #dcd8f2; transition: transform .15s var(--ease), color .15s; }
.star-btn:hover { transform: scale(1.2) rotate(-6deg); }
.star-btn.on { color: #ffb400; text-shadow: 0 2px 6px rgba(255, 180, 0, .4); }

/* picker */
.pick { position: relative; display: grid; gap: .6rem; }
.pick-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.pick-trigger { flex: 1 1 220px; display: flex; align-items: center; gap: .5rem; min-height: 46px; padding: 0 .9rem 0 1rem; font: inherit; font-weight: 700; color: var(--ink); text-align: left; background: #fbfaff; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pick-trigger:hover { border-color: #d7d2fa; }
.pick-trigger[aria-expanded='true'], .pick-trigger:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108, 92, 231, .14); outline: none; }
.pick-trigger .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-trigger .lbl.placeholder { color: #8f8db4; font-weight: 600; }
.pick-trigger svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .2s var(--ease); }
.pick-trigger[aria-expanded='true'] svg { transform: rotate(180deg); }
.pick-row .chip { min-height: 46px; padding: 0 1rem; border-radius: 14px; }
.pick-pop { position: absolute; z-index: 25; left: 0; right: 0; top: 52px; display: grid; gap: .55rem; padding: .7rem; background: #fff; border: 2px solid var(--primary); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .22s var(--ease) both; }
.pick-pop .chips { gap: .35rem; }
.pick-pop .chip { padding: .15rem .65rem; font-size: .78rem; }
.pick-list { max-height: 300px; overflow: auto; display: grid; gap: .25rem; padding-right: .15rem; overscroll-behavior: contain; }
.pick-opt { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; padding: .55rem .65rem; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .92rem; line-height: 1.4; transition: background .12s; }
.pick-opt:hover { background: var(--primary-50); }
.pick-opt:has(input:checked) { background: var(--acc-soft); }
.pick-opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.pick-opt:has(input:focus-visible) { outline: 3px solid rgba(108, 92, 231, .45); outline-offset: -2px; }
.pick-opt input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--primary); }
.tone { font-size: .85rem; }
.pick-foot { display: flex; align-items: center; gap: .6rem; justify-content: space-between; flex-wrap: wrap; padding-top: .35rem; border-top: 1px dashed var(--line); }
.pick-none { padding: 1rem; text-align: center; color: var(--muted); font-weight: 700; }
.pick-chosen { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.pick-chosen li { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem .5rem .5rem .8rem; border-radius: 14px; background: var(--acc-soft); font-weight: 600; font-size: .92rem; line-height: 1.4; animation: pop .25s var(--ease) both; }
.pick-chosen li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pick-chosen .icon-btn { width: 28px; height: 28px; border-radius: 9px; flex: none; }
.pick-chosen .icon-btn svg { width: 15px; height: 15px; }
.pick-custom { min-height: 92px; padding: .7rem 1rem; line-height: 1.45; resize: vertical; }
.pick-count { text-align: right; font-size: .75rem; color: var(--muted); font-weight: 700; margin-top: -.3rem; }

/* accents (editor) */
.sec-card.acc-speaking { --acc: #ff6b81; --acc-soft: #ffe9ed; } .sec-card.acc-listening { --acc: #3fa9f5; --acc-soft: #e3f3ff; }
.sec-card.acc-reading { --acc: #1fc9a0; --acc-soft: #dcf8ef; } .sec-card.acc-writing { --acc: #ff922b; --acc-soft: #ffefdc; }
.sec-card.acc-pronunciation { --acc: #f783ac; --acc-soft: #ffe6f1; } .sec-card.acc-vocabulary { --acc: #ffbe2e; --acc-soft: #fff4d3; }
.sec-card.acc-grammar { --acc: #6c5ce7; --acc-soft: #ece9ff; } .sec-card.acc-comprehension { --acc: #20c997; --acc-soft: #daf9ec; }
.sec-card.acc-behavior { --acc: #845ef7; --acc-soft: #efe9ff; } .sec-card.acc-attendance { --acc: #339af0; --acc-soft: #deeeff; }
.sec-card.acc-computer { --acc: #fd7e14; --acc-soft: #ffeddc; } .sec-card.acc-impression, .sec-card.acc-conclusion { --acc: #f06595; --acc-soft: #ffe6ef; }

.finish { text-align: center; display: grid; gap: .8rem; justify-items: center; }
.finish .mascot { width: 84px; }
.finish .row { justify-content: center; }

@media (max-width: 1100px) {
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-tabs { display: inline-flex; }
  .ed.mode-edit .ed-preview { display: none; }
  .ed.mode-preview .ed-form { display: none; }
  .ed-preview { position: static; max-height: none; }
  .ed-bar { margin-top: -1.25rem; }
}
@media (max-width: 520px) {
  .levels { grid-template-columns: repeat(3, 1fr); }
  .meter-track { width: 60px; }
  .pick-pop { position: fixed; left: .6rem; right: .6rem; top: auto; bottom: .6rem; max-height: 78vh; overflow: auto; }
  .pick-list { max-height: 48vh; }
}
.hide-sm{}@media (max-width:640px){.hide-sm{display:none}}
.ed-preview-head > svg { width: 20px; height: 20px; flex: none; color: var(--primary); }
.ed-card .grid-2 { margin-bottom: .85rem; gap: .85rem 1rem; } .ed-card .grid-2 .field { margin-bottom: 0; }
html { scrollbar-gutter: stable; }
