/* Reader profile (/myprofile) + favourite buttons */
.mp { --mp-brown:#7a4b2a; --mp-brown-d:#5a3419; --mp-dark:#2f1e11; --mp-sand:#f3e6d3; --mp-border:#e6d6bf; --mp-muted:#8a7664; --mp-red:#b3382c;
  max-width: 920px; margin: 0 auto; padding: 28px 16px 64px; font-family: "Inter", "Noto Sans Devanagari", system-ui, sans-serif; color: #3a2616; }
.mp *, .mp *::before, .mp *::after { box-sizing: border-box; }
.mp-card { background: #fffdf9; border: 1px solid var(--mp-border); border-radius: 18px; padding: 22px; margin-bottom: 16px; box-shadow: 0 10px 30px -22px rgba(73,51,33,.5); }
.mp-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mp-head-txt { flex: 1 1 220px; min-width: 0; }
.mp-head h1 { margin: 0 0 4px; font: 700 26px "Playfair Display", Georgia, serif; color: var(--mp-dark); overflow-wrap: anywhere; }
.mp-head p { margin: 2px 0; font-size: 14px; overflow-wrap: anywhere; }
.mp-muted { color: var(--mp-muted); font-size: 13px; }
.mp-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.mp-av { display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--mp-brown); color: #fff; font-weight: 700; border: 2px solid var(--mp-border); }
.mp-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-av-xl { width: 84px; height: 84px; font-size: 34px; }
.mp-av-lg { width: 76px; height: 76px; font-size: 30px; }
.mp-av-md { width: 46px; height: 46px; font-size: 18px; }

.mp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; font: 600 14px "Inter", sans-serif; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, border-color .15s; }
.mp-btn[disabled] { opacity: .65; cursor: not-allowed; }
.mp-btn-primary { background: var(--mp-brown); color: #fff; }
.mp-btn-primary:hover { background: var(--mp-brown-d); }
.mp-btn-dark { background: var(--mp-dark); color: #fff; }
.mp-btn-ghost { background: #fff; color: var(--mp-brown); border-color: var(--mp-border); }
.mp-btn-ghost:hover { border-color: var(--mp-brown); }
.mp-sm { padding: 7px 14px; font-size: 13px; }
.mp-link { background: none; border: 0; color: var(--mp-brown); font: 600 13px "Inter", sans-serif; cursor: pointer; text-decoration: underline; margin-left: 8px; }

.mp-tabs { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; padding-bottom: 2px; }
a.mp-tab { text-decoration: none; }
.mp-tab { flex: none; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--mp-border); background: #fffdf9; font: 600 14px "Inter", sans-serif; color: var(--mp-dark); cursor: pointer; }
.mp-tab i { font-style: normal; margin-left: 4px; background: var(--mp-sand); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.mp-tab.is-active { background: var(--mp-sand); border-color: var(--mp-brown); }
.mp-pane[hidden] { display: none; }
.mp-sub { margin: 26px 0 12px; font: 700 18px "Playfair Display", Georgia, serif; color: var(--mp-dark); }

.mp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mp-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--mp-border); border-radius: 14px; background: #fff; }
.mp-item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; }
.mp-item-main b { font-size: 16px; color: var(--mp-dark); overflow-wrap: anywhere; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.mp-poet { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--mp-border); border-radius: 14px; background: #fff; }
.mp-poet-top { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.mp-poet-top div { display: flex; flex-direction: column; min-width: 0; }
.mp-poet-top b { color: var(--mp-dark); overflow-wrap: anywhere; }
.mp-empty { text-align: center; padding: 26px 8px; }
.mp-empty p { margin: 0 0 14px; color: var(--mp-muted); }

.mp-form { display: grid; gap: 16px; max-width: 520px; }
.mp-photo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mp-field { display: flex; flex-direction: column; gap: 6px; }
.mp-field label { font-size: 13px; font-weight: 600; color: var(--mp-dark); }
.mp-field label b { color: var(--mp-red); }
.mp-field input { width: 100%; padding: 12px 14px; font: 400 15px "Inter", sans-serif; border: 1.5px solid var(--mp-border); border-radius: 10px; background: #fffdf8; color: #3a2616; }
.mp-field input:focus { outline: none; border-color: var(--mp-brown); box-shadow: 0 0 0 3px rgba(122,75,42,.14); }
.mp-field input:disabled { background: #f6f1ea; color: var(--mp-muted); }
.mp-err { color: var(--mp-red); font-size: 12.5px; min-height: 0; }

.mp-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #2f7a4b; color: #fff; padding: 11px 20px; border-radius: 999px; font: 600 14px "Inter", sans-serif; transition: .25s; z-index: 9999; }
.mp-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.mp-toast.is-bad { background: var(--mp-red); }

@media (max-width: 560px) {
  .mp { padding: 16px 12px 48px; }
  .mp-card { padding: 16px; }
  .mp-head { flex-direction: column; align-items: flex-start; }
  .mp-item { flex-wrap: wrap; }
}

/* kavita page / poet page: favourite button */
.kr__foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kr__fav { border: 1.5px solid #805633; background: #fff; color: #805633; cursor: pointer; font: 700 15px "Inter", sans-serif; }
.kr__fav.is-on { background: #805633; color: #fff; }
.kr__fav[disabled], #favPoet[disabled] { opacity: .7; cursor: wait; }
#favPoet.is-on { background: #805633; color: #fff; }

/* header: logged-in user ka avatar (Login / Sign Up ki jagah) */

.mp-pane-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.mp-pane-head p{margin:0}

/* Plan + history */
.mp-plan { border: 1px solid var(--mp-border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mp-plan.is-on { background: #f1f7ee; border-color: #b9d5ad; }
.mp-plan.is-off { background: #fbf3e6; }
.mp-plan p { margin: 0; color: var(--mp-muted); font-size: 14px; }
.mp-tablewrap { overflow-x: auto; }
.mp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mp-table th, .mp-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--mp-border); white-space: nowrap; }
.mp-table th { color: var(--mp-muted); font-weight: 600; }
.mp-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.mp-pill.is-on { background: #dff0d8; color: #2f6b21; }
.mp-pill.is-off { background: #eee6da; color: #7a6a58; }


/* ---------- Become a Poet ---------- */
.mp-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mp-form-wide { max-width: 760px; }
.mp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .mp-grid2 { grid-template-columns: 1fr; } }
.mp-opt { font-weight: 400; color: var(--mp-muted); font-size: 12px; }
.mp-field textarea { width: 100%; padding: 12px 14px; font: 400 15px "Inter", sans-serif; border: 1.5px solid var(--mp-border); border-radius: 10px; background: #fffdf8; color: #3a2616; resize: vertical; }
.mp-field textarea:focus { outline: none; border-color: var(--mp-brown); box-shadow: 0 0 0 3px rgba(122,75,42,.14); }
.mp-field input[type="file"] { padding: 9px 10px; }
.mp-fieldset { border: 1.5px solid var(--mp-border); border-radius: 12px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.mp-fieldset legend { font-size: 13px; font-weight: 600; color: var(--mp-dark); padding: 0 6px; }
.mp-fieldset legend b { color: var(--mp-red); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chip { position: relative; cursor: pointer; }
.mp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mp-chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--mp-border); border-radius: 999px; font-size: 13.5px; background: #fffdf8; color: #3a2616; transition: .15s; }
.mp-chip input:checked + span { background: var(--mp-brown); border-color: var(--mp-brown); color: #fff; }
.mp-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(122,75,42,.25); }
.mp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.mp-check input { margin-top: 3px; }
.mp-note { padding: 16px 18px; border-radius: 12px; border: 1.5px solid var(--mp-border); background: #fffdf8; display: grid; gap: 8px; justify-items: start; }
.mp-note b { font-size: 16px; color: var(--mp-dark); }
.mp-note p { margin: 0; color: var(--mp-muted); font-size: 14px; }
.mp-note.is-pending { border-color: #e0b552; background: #fff8e6; }
.mp-note.is-ok { border-color: #7fb88a; background: #eef8f0; }
.mp-note.is-bad { border-color: #d98b86; background: #fff1f0; }
.mp [hidden] { display: none !important; }

/* ---------- Responsive reader dashboard refresh ---------- */
.mp {
  width: min(1240px, calc(100% - 40px));
  max-width: none;
  padding: clamp(22px, 4vw, 48px) 0 72px;
  --mp-brown: #805333;
  --mp-brown-d: #633d20;
  --mp-dark: #382516;
  --mp-sand: #f3e6d3;
  --mp-border: #ead8c1;
}
.mp-card { padding: clamp(20px, 3vw, 30px); border-radius: 22px; box-shadow: 0 14px 36px -28px rgba(61,39,20,.42); }
.mp-head {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 20px; padding: clamp(22px, 3.5vw, 36px);
  background: linear-gradient(112deg, #f4e5d0 0%, #fffaf3 56%, #fffdf9 100%);
  box-shadow: 0 16px 36px -28px rgba(79,49,25,.48);
}
.mp-head::after { content: "✦"; position: absolute; right: 23%; top: -42px; color: rgba(128,83,51,.07); font: 180px/1 Georgia,serif; pointer-events: none; }
.mp-head > * { position: relative; z-index: 1; }
.mp-av-xl { width: clamp(76px, 8vw, 104px); height: clamp(76px, 8vw, 104px); font-size: clamp(30px, 4vw, 42px); box-shadow: 0 8px 20px rgba(86,52,27,.18); }
.mp-head-txt { flex: initial; }
.mp-eyebrow { display: inline-flex; margin-bottom: 5px; color: #a55f38; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.mp-head h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.15; }
.mp-head-txt > p:first-of-type { color: #64503f; font-size: 14px; }
.mp-member-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 5px 10px; border: 1px solid #e8d4b9; border-radius: 99px; background: rgba(255,255,255,.7); color: #80654e; font-size: 11px; font-weight: 650; }
.mp-head-actions { justify-content: flex-end; }
.mp-head-actions .mp-btn { min-height: 42px; }
.mp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 0 0 18px; }
.mp-stat { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid var(--mp-border); border-radius: 16px; background: #fffdf9; box-shadow: 0 8px 20px -18px rgba(61,39,20,.6); }
.mp-stat-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #f5e8d7; color: var(--mp-brown); font-size: 22px; }
.mp-stat--poets .mp-stat-icon { background: #f8e8df; color: #a65d3b; }
.mp-stat--member .mp-stat-icon { background: #eee9dc; color: #847044; }
.mp-stat div { display: grid; min-width: 0; gap: 1px; }
.mp-stat small { color: var(--mp-muted); font-size: 11px; }
.mp-stat b { color: var(--mp-dark); font: 700 21px/1.1 "Playfair Display", Georgia, serif; }
.mp-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; overflow: visible; padding: 0; }
.mp-tab { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fffdf9; color: #5a4330; font-size: 12px; text-align: left; white-space: normal; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.mp-tab > span { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 9px; background: #f5eadb; color: var(--mp-brown); font-size: 16px; }
.mp-tab i { margin-left: auto; }
.mp-tab:hover { transform: translateY(-1px); border-color: #c9a57e; box-shadow: 0 5px 14px rgba(73,51,33,.08); }
.mp-tab.is-active { background: #744a2a; border-color: #744a2a; color: #fff; box-shadow: 0 7px 18px rgba(87,53,28,.18); }
.mp-tab.is-active > span, .mp-tab.is-active i { background: rgba(255,255,255,.16); color: #fff; }
.mp-tab:focus-visible, .mp-btn:focus-visible { outline: 3px solid rgba(128,83,51,.28); outline-offset: 2px; }
.mp-pane { min-width: 0; padding: clamp(20px, 3vw, 30px); }
.mp-pane-head { align-items: center; margin-bottom: 18px; }
.mp-pane-head > div { min-width: 0; }
.mp-pane-head .mp-sub { margin: 0 0 4px; font-size: clamp(19px, 2.5vw, 24px); }
.mp-pane-head .mp-muted { line-height: 1.5; }
.mp-sub { margin-top: 22px; font-size: 21px; }
.mp-empty { padding: 38px 16px; border: 1px dashed #ddc8ab; border-radius: 16px; background: linear-gradient(135deg,#fffaf2,#fffdf9); }
.mp-item, .mp-poet { border-color: #eddfcd; box-shadow: 0 7px 20px -20px rgba(58,38,22,.65); }
.mp-item { padding: 15px; }
.mp-item:hover, .mp-poet:hover { border-color: #d4b38f; }
.mp-plan { width: 100%; padding: 22px; border-radius: 17px; }
.mp-plan b { color: var(--mp-dark); font: 700 20px "Playfair Display", Georgia,serif; }
.mp-tablewrap { width: 100%; border: 1px solid #eddfcd; border-radius: 14px; background: #fff; }
.mp-table { min-width: 680px; }
.mp-table th { background: #f5eadb; color: #6f5238; font-size: 11px; letter-spacing: .035em; }
.mp-table th:first-child { border-radius: 12px 0 0 0; }
.mp-table th:last-child { border-radius: 0 12px 0 0; }
.mp-table td, .mp-table th { padding: 12px 13px; }
.mp-table td { line-height: 1.45; }
.mp-table tbody tr:hover { background: #fffbf5; }
.mp-table td b { color: #3e2a1a; }
.mp-form { width: 100%; max-width: 640px; }
.mp-form-wide { max-width: 900px; }
.mp-field input, .mp-field textarea { min-width: 0; }
.mp-btn { min-height: 40px; }

@media (max-width: 900px) {
  .mp { width: min(100% - 32px, 760px); }
  .mp-head { grid-template-columns: auto minmax(0, 1fr); }
  .mp-head-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .mp-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mp { width: calc(100% - 24px); padding: 16px 0 40px; }
  .mp-card { margin-bottom: 12px; padding: 17px; border-radius: 17px; }
  .mp-head { gap: 13px; padding: 18px; }
  .mp-head-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .mp-head-actions .mp-btn { width: 100%; padding: 9px 10px; font-size: 12px; }
  .mp-head h1 { font-size: clamp(22px, 6vw, 29px); }
  .mp-head-txt > p:first-of-type { font-size: 12px; line-height: 1.45; }
  .mp-eyebrow { font-size: 9px; }
  .mp-stats { gap: 7px; margin-bottom: 13px; }
  .mp-stat { display: grid; justify-items: start; gap: 7px; padding: 10px; border-radius: 13px; }
  .mp-stat-icon { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 17px; }
  .mp-stat small { font-size: 9px; line-height: 1.2; }
  .mp-stat b { font-size: 18px; }
  .mp-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
  .mp-tab { min-height: 44px; gap: 6px; padding: 8px; border-radius: 11px; font-size: 10px; line-height: 1.25; }
  .mp-tab > span { flex-basis: 23px; width: 23px; height: 23px; font-size: 14px; }
  .mp-tab i { padding: 1px 6px; font-size: 10px; }
  .mp-pane-head { align-items: flex-start; }
  .mp-pane-head > .mp-btn { width: 100%; }
  .mp-grid2 { grid-template-columns: minmax(0,1fr); }
  .mp-form { gap: 13px; }
  .mp-tablewrap { overflow: visible; border: 0; background: transparent; }
  .mp-table { display: block; min-width: 0; border-collapse: separate; }
  .mp-table thead { display: none; }
  .mp-table tbody { display: grid; gap: 10px; }
  .mp-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; padding: 8px 12px; border: 1px solid #eddfcd; border-radius: 14px; background: #fff; box-shadow: 0 7px 18px -20px rgba(58,38,22,.7); }
  .mp-table td { display: flex; min-width: 0; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px solid #f1e8dc; white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
  .mp-table td::before { content: attr(data-label); color: #92785e; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
  .mp-table td:first-child { grid-column: 1 / -1; }
  .mp-table td:last-child { border-bottom: 0; justify-content: center; }
  .mp-table td .mp-btn { align-self: flex-start; min-height: 34px; padding: 6px 10px; font-size: 11px; }
  .mp-item { align-items: flex-start; padding: 12px; }
  .mp-item > .mp-btn { flex: none; padding: 7px 10px; font-size: 11px; }
  .mp-photo { align-items: flex-start; }
  .mp-toast { width: calc(100% - 28px); bottom: calc(16px + env(safe-area-inset-bottom)); text-align: center; border-radius: 14px; }
}
@media (max-width: 380px) {
  .mp { width: calc(100% - 18px); }
  .mp-head { grid-template-columns: 56px minmax(0,1fr); gap: 10px; padding: 14px; }
  .mp-av-xl { width: 56px; height: 56px; font-size: 23px; }
  .mp-head-actions { gap: 6px; }
  .mp-head-actions .mp-btn { font-size: 11px; }
  .mp-stats { grid-template-columns: 1fr; }
  .mp-stat { display: flex; align-items: center; padding: 9px 12px; }
  .mp-stat div { grid-template-columns: 1fr auto; width: 100%; align-items: center; }
  .mp-stat b { grid-column: 2; grid-row: 1; }
  .mp-table tr { grid-template-columns: minmax(0,1fr); }
  .mp-table td:first-child { grid-column: auto; }
}
