/* The approved KOD DUSHI visual vocabulary: milky glass, burgundy,
   original Manrope/Caveat fonts and restrained gold. No new image assets. */
.cabinet-main{width:min(1120px,calc(100% - 36px));margin:0 auto;padding:16px 0 60px}
.cabinet-hero{text-align:center;padding:clamp(32px,5vw,64px) 20px 28px}
.cabinet-hero h1{
  font:700 clamp(34px,5.1vw,64px)/1.14 Manrope,Arial,sans-serif;
  letter-spacing:-.045em;color:#4d0e13;margin:12px 0 18px;
}
.cabinet-hero h1 em{
  display:inline;color:#936657;font-family:Caveat,cursive;
  font-weight:400;letter-spacing:-.02em;font-size:1.13em;
}
.cabinet-hero>p:last-child{margin:0 auto;max-width:540px;color:#765d67;line-height:1.68;font-size:14px}
.cabinet-paper{
  background:linear-gradient(132deg,rgba(255,251,244,.94),rgba(255,248,236,.8));
  border:1px solid rgba(229,210,190,.95);
  border-radius:clamp(20px,3vw,30px);
  box-shadow:0 21px 64px rgba(77,14,19,.065),inset 0 1px 1px rgba(255,255,255,.9);
  padding:clamp(19px,3.2vw,38px);
  max-width:100%;min-width:0;
}
.cabinet-guest{max-width:650px;margin:0 auto}
.cabinet-auth-head{display:grid;gap:8px;margin-bottom:12px}
.cabinet-auth-head h2,.cabinet-user-head h2{
  font:700 clamp(24px,2.5vw,33px)/1.25 Manrope,Arial,sans-serif;
  margin:3px 0 15px;color:#4d0e13;
}
.cabinet-auth-head .matrix-tabs{
  display:flex;align-items:center;justify-content:space-between;
  gap:4px;padding:5px;
  border:1px solid #e5cdbd;
  border-radius:999px;
  background:rgba(255,255,255,.68);
  box-shadow:inset 0 1px 2px #fff;
}
.cabinet-auth-head .matrix-tab{
  display:inline-flex;align-items:center;justify-content:center;
  flex:1;min-width:0;min-height:43px;
  padding:10px 13px;
  font:650 13px/1.3 Manrope,Arial,sans-serif;
  white-space:normal;border-radius:999px;
  color:#6d4a57;cursor:pointer;
  border:1px solid transparent;background:transparent;
}
.cabinet-auth-head .matrix-tab.active{
  color:#fff8ef;background:#4d0e13;border-color:#4d0e13;
  box-shadow:0 4px 13px rgba(77,14,19,.17);
}
#cabinet-auth-description{margin:10px 0 19px;font-size:13px;line-height:1.6;color:#715967}
.cabinet-form{display:grid;gap:9px}
.cabinet-form label{font:700 12px/1.45 Manrope,Arial,sans-serif;color:#70475a;margin-top:5px}
.cabinet-form input{
  display:block;width:100%;min-width:0;min-height:53px;
  font:500 14px/1.3 Manrope,Arial,sans-serif;color:#4d0e13;
  border:1px solid #dcc8c6;border-radius:14px;
  background:#fffaf5;padding:12px 15px;
  box-shadow:inset 0 2px 8px rgba(62,26,36,.03),0 1px 0 #fff;
}
.cabinet-form input:focus-visible{outline:2px solid #ac7d91;outline-offset:2px}
.cabinet-form>.primary-action{
  justify-self:start;margin-top:15px;
  padding:13px 27px;border-radius:999px;
  font-size:13px;min-height:51px;
}
.cabinet-security-note{
  font-size:11px;line-height:1.7;color:#947b7d;
  margin:22px 0 0;max-width:530px;
}
.cabinet-feedback{min-height:0;font-size:12px;line-height:1.6;color:#755568;margin-top:12px}
.cabinet-feedback:empty{display:none}
.cabinet-feedback[data-error="true"]{color:#9c3646}
.cabinet-recovery-result{
  margin-top:19px;padding:clamp(14px,2vw,21px);
  border:1px solid #d8bf9b;
  border-radius:19px;background:#fff6e8;
}
.cabinet-recovery-result h3{margin:0 0 8px;font-size:18px;color:#4d0e13}
.cabinet-recovery-result p{margin:0 0 15px;line-height:1.6;font-size:13px;color:#654d52}
.cabinet-recovery-code{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.cabinet-recovery-code code{flex:1 1 195px;min-width:0;overflow-wrap:anywhere;font-size:13px;color:#4d0e13}
.cabinet-recovery-code button,.cabinet-ghost{
  border:1px solid #d9c3b5;border-radius:999px;
  background:#fffaf1;color:#4d0e13;
  padding:11px 17px;font-weight:700;font-size:12px;
}
#cabinet-continue{margin-top:18px}
.cabinet-user-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px}
.cabinet-user-head h2{margin-bottom:4px}
.cabinet-user-head p:last-child{font-size:12px;color:#8c6e76;overflow-wrap:anywhere}
.cabinet-books-meta{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:18px 0 15px;margin-top:14px;
  border-top:1px solid #e7d9cf;
  font-size:12px;line-height:1.6;color:#80626b;
}
.cabinet-link{color:#4d0e13;font-weight:700;text-decoration:underline;text-underline-offset:5px}
.cabinet-books{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(10px,1.8vw,18px)}
.cabinet-book-card{
  display:flex;flex-direction:column;align-items:stretch;
  min-width:0;min-height:226px;
  background:linear-gradient(145deg,#fff9f0,#f4e7df);
  border:1px solid #ead5c5;border-radius:20px;
  padding:clamp(15px,2vw,21px);
  box-shadow:0 11px 28px rgba(77,14,19,.035);
}
.cabinet-book-card .cabinet-card-eyebrow{
  display:block;font-size:9px;font-weight:750;letter-spacing:.16em;color:#9d7880;margin-bottom:13px
}
.cabinet-book-card h3{font-size:clamp(14px,1.5vw,18px);line-height:1.36;color:#4d0e13;margin:0 0 8px}
.cabinet-book-card p{font-size:12px;line-height:1.55;color:#765968;margin:0 0 10px}
.cabinet-book-card .cabinet-card-date{font-size:10px;color:#927982}
.cabinet-card-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:auto;padding-top:18px}
.cabinet-card-actions button{border-radius:999px;min-height:39px;padding:8px 13px;font:650 12px Manrope,Arial,sans-serif}
.cabinet-card-open{border:1px solid #4d0e13;background:#4d0e13;color:white}
.cabinet-card-remove{border:1px solid #e1c7bd;background:#fffaf1;color:#744853}
.cabinet-empty{
  grid-column:1/-1;padding:clamp(25px,3vw,40px);
  text-align:center;border:1px dashed #dfc9c0;border-radius:21px;color:#795d6a;
}
.cabinet-empty p{line-height:1.65}
.cabinet-danger{border-top:1px solid #e7d9cf;margin-top:28px;padding-top:19px}
.cabinet-danger>summary{cursor:pointer;font-size:12px;color:#94737d;font-weight:650}
.cabinet-danger p{font-size:12px;line-height:1.65;color:#9a6370}
.cabinet-danger .cabinet-form{max-width:360px;margin-top:14px}
.cabinet-delete-button{margin-top:8px;justify-self:start;border:1px solid #b7797f;border-radius:999px;background:#fff2ed;color:#973a46;padding:11px 17px;font-weight:700}
.cabinet-footer-links{display:flex;flex-wrap:wrap;gap:18px;justify-content:center;margin-top:32px;font-size:12px;color:#704b60}
.cabinet-footer-links a{text-decoration:underline;text-underline-offset:4px}
@media(max-width:820px){.cabinet-books{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:570px){
 .cabinet-main{width:calc(100% - 24px);padding-top:8px}
 .cabinet-hero{padding:30px 7px 22px}
 .cabinet-auth-head .matrix-tabs{width:100%}
 .cabinet-auth-head .matrix-tab{padding:10px 4px;font-size:11px}
 .cabinet-books{grid-template-columns:1fr}
 .cabinet-books-meta{align-items:flex-start;flex-direction:column}
 .cabinet-paper{padding:20px 15px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
