/* Shared feedback entry and private inbox; scoped to avoid affecting lesson forms. */
.app-header { position: sticky; top: 0; z-index: 30; }
.app-header-inner { column-gap: 24px; }
.app-header-meta { gap: 14px; }
.fb-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy); font: 600 13px var(--font-ui); cursor: pointer; white-space: nowrap; }
.fb-trigger:hover { background: var(--mint); border-color: #b7ded9; }
.fb-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fb-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 20px; background: var(--cyan-dark); color: #fff; font-size: 11px; }
.fb-count[hidden], .fb-hidden, #feedback-dialog [hidden] { display: none !important; }
#feedback-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: #fff; box-shadow: 0 24px 100px #12356b26; font-family: var(--font-ui); }
#feedback-dialog::backdrop { background: #17354c66; }
#feedback-dialog .fb-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 16px; background: #fff; border-bottom: 1px solid var(--line); }
#feedback-dialog h2 { margin: 0; color: var(--navy); font-size: 23px; }
.fb-close { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 25px; }
.fb-dialog-body { padding: 22px 28px 28px; }
.fb-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 20px; }
.fb-links a, .fb-source a { color: var(--cyan-dark); font-size: 13px; text-underline-offset: 4px; }
.fb-copy { margin: 0 0 22px; color: #596e81; font-size: 14px; line-height: 1.8; }
.fb-form { display: grid; gap: 18px; margin: 0; }
.fb-field { display: grid; gap: 9px; font-size: 14px; color: var(--ink); font-weight: 600; }
.fb-field small { display: inline; margin-left: 6px; font-size: 12px; font-weight: 400; color: #596e81; }
.fb-form textarea, .fb-field select, .fb-filters select { width: 100%; min-width: 0; border: 1px solid #cbdce2; border-radius: 12px; background: #fff; color: var(--ink); font: 14px var(--font-ui); padding: 12px 14px; }
.fb-form textarea { min-height: 130px; resize: vertical; line-height: 1.75; }
.fb-form textarea::placeholder { color: #6e7f8d; }
.fb-hint { margin: 0; color: #596e81; font-size: 12px; line-height: 1.7; font-weight: 400; overflow-wrap: anywhere; }
.fb-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fb-upload-label { display: grid; place-items: center; align-content: center; gap: 5px; width: 96px; min-height: 90px; border: 1px dashed #b8ced6; border-radius: 14px; background: var(--paper); cursor: pointer; color: var(--cyan-dark); font-size: 12px; font-weight: 500; }
.fb-upload-label span { font-size: 26px; }
.fb-upload-control { position: relative; }
.fb-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.fb-upload-control:focus-within .fb-upload-label { outline: 3px solid var(--sky); outline-offset: 3px; }
.fb-thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
.fb-thumb { position: relative; margin: 0; }
.fb-thumb img { display: block; width: 96px; height: 90px; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; }
.fb-remove { position: absolute; right: -6px; top: -6px; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--navy); font-size: 18px; cursor: pointer; }
.fb-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy); font: 600 14px var(--font-ui); text-decoration: none; cursor: pointer; }
.fb-button:hover { background: var(--mint); }
.fb-button-primary { background: var(--navy); border-color: var(--navy); color: white; }
.fb-button-primary:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); }
.fb-button:disabled { opacity: .5; cursor: not-allowed; }
.fb-notice { margin: 0; font-size: 13px; color: var(--cyan-dark); line-height: 1.7; overflow-wrap: anywhere; }
.fb-notice.is-error { color: #a04435; }
.fb-success { text-align: center; padding: 24px 0 12px; }
.fb-success-mark { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 20px; border-radius: 50%; background: var(--mint); color: var(--cyan-dark); font-size: 28px; }
.fb-success h3 { font-size: 23px; color: var(--navy); margin: 0 0 12px; }
.fb-success .fb-actions { justify-content: center; }
.fb-page { max-width: 1176px; margin: 0 auto; padding: 40px 0 56px; min-height: 65vh; }
.fb-page h1 { margin: 8px 0 10px; color: var(--navy); font-size: 32px; }
.fb-eyebrow { margin: 0; color: var(--cyan-dark); font-size: 11px; letter-spacing: 1.8px; font-weight: 700; }
.fb-page-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.fb-page-top .fb-copy { margin: 0; }
.fb-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.fb-tabs a[aria-current="page"] { border-color: #b7ded9; background: var(--mint); color: var(--cyan-dark); }
.fb-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; margin-bottom: 24px; }
.fb-filters label { display: grid; gap: 7px; color: #596e81; font-size: 12px; flex: 1; min-width: 130px; }
.fb-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.5fr); gap: 24px; align-items: start; }
.fb-list { display: grid; gap: 10px; }
.fb-list-item { display: grid; gap: 10px; width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; color: var(--ink); cursor: pointer; }
.fb-list-item:hover, .fb-list-item[aria-pressed="true"] { border-color: #78c7c1; background: #f1faf8; }
.fb-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--cyan-dark); }
.fb-status { display: inline-flex; align-items: center; border-radius: 7px; padding: 4px 8px; font-size: 11px; background: #edf4fc; color: #345881; }
.fb-status[data-status="in_progress"] { background: #fff3e8; color: #865521; }
.fb-status[data-status="resolved"] { background: #edf7f2; color: #287455; }
.fb-status[data-status="recorded"] { background: #f3effa; color: #70538c; }
.fb-summary { margin: 0; font: 500 14px/1.7 var(--font-ui); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fb-meta { display: block; color: #596e81; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.fb-paging { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.fb-paging .fb-button { padding: 8px 12px; }
.fb-detail { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: #fff; min-width: 0; }
.fb-detail h2 { margin: 0 0 12px; color: var(--navy); font-size: 22px; }
.fb-detail h3 { margin: 24px 0 14px; color: var(--navy); font-size: 16px; }
.fb-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.85; margin: 18px 0; }
.fb-source { border-radius: 12px; padding: 12px 14px; background: var(--paper); color: #596e81; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.fb-images { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.fb-images img { display: block; width: 100px; height: 88px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; }
.fb-reply { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 15px; margin-top: 12px; }
.fb-reply[data-role="admin"] { background: #eff9f7; border-color: #d4eae6; }
.fb-reply .fb-body { margin: 8px 0 0; }
.fb-reply-form { margin-top: 20px; }
.fb-status-form { margin: 22px 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.fb-status-form .fb-field { flex: 1; }
.fb-empty { text-align: center; padding: 38px 20px; color: #596e81; line-height: 1.9; background: #fff; border: 1px dashed var(--line); border-radius: 18px; }
.fb-back { display: none; }
@media (max-width: 1240px) { .fb-page { margin: 0 24px; } }
@media (min-width: 761px) and (max-width: 1080px) { .app-header-meta .app-site-link, .app-header-meta .app-beta { display: none; } .app-header-inner { gap: 18px; } .app-nav a { padding: 10px 12px; } }
@media (max-width: 760px) {
  .app-header-meta { gap: 8px; } .app-header-meta .app-beta { display: none; }
  .fb-page { margin: 0 18px; padding-top: 28px; } .fb-page h1 { font-size: 27px; }
  .fb-page-top { align-items: flex-start; } .fb-page-top > .fb-button { flex-shrink: 0; padding: 10px 12px; }
  .fb-layout { grid-template-columns: 1fr; gap: 18px; } .fb-detail { padding: 20px; }
  .fb-detail:has(.fb-empty) { display: none; } .fb-back { display: inline-flex; margin-bottom: 18px; }
  .fb-filters { padding: 14px; gap: 10px; } .fb-filters label { min-width: 110px; }
  #feedback-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 20px; }
  #feedback-dialog .fb-dialog-head { padding: 18px 20px 14px; } .fb-dialog-body { padding: 20px; }
  .fb-links { gap: 14px; } .fb-trigger { padding: 8px 10px; }
}
@media (max-width: 390px) { .app-header-meta .app-site-link { display: none; } }

.fb-layout, .fb-detail, .fb-list { scroll-margin-top: 160px; }

.fb-admin-entry { text-decoration:none; }.fb-admin-entry[hidden] { display:none; }.skip-link { z-index:40; }
