/* Book-like layout + typography (responsive) */

:root{
  --bg: #fbfaf7;
  --ink: #1a1a1a;
  --muted: #5b5b5b;
  --rule: rgba(0,0,0,.12);
  --max: 46rem;         /* ~736px reading width */
  --pad: clamp(16px, 3vw, 28px);
  --radius: 14px;
}

*{ box-sizing: border-box; }

html,body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  line-height: 1.75;
  font-size: clamp(18px, 2.1vw, 21px); /* larger text, scales on phone */
}

a{
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
a:hover{ opacity:.85; }

.book-shell{
  padding: var(--pad);
}

.book{
  max-width: var(--max);
  margin: 0 auto;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 34px);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.book-nav{
  display:flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: .95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.book-nav a{ color: var(--muted); }

h1,h2,h3{
  line-height: 1.2;
  margin: 0 0 .6rem 0;
  letter-spacing: .01em;
}
h1{
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
}
h2{
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin-top: 1.8rem;
}
.book-subtitle{
  color: var(--muted);
  margin: .2rem 0 1.3rem 0;
  font-style: italic;
}

hr{
  border:0;
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0;
}

.book-cover{
  width: 100%;
  border-radius: 12px;
  margin: 1rem 0 1.6rem 0;
  display:block;
}

.book-chapter-title{
  margin-top: 0;
}

.book-footer{
  margin-top: 2rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: .95rem;
}

.book-list{
  padding-left: 1.2rem;
  margin: .8rem 0 0 0;
}
.book-list li{
  margin: .35rem 0;
}

/* Buttons (optional) */
.btn{
  display:inline-block;
  padding: .55rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.7);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: .95rem;
  text-decoration: none;
}
.btn:hover{ opacity:.9; }

/* On very small screens, reduce card feel slightly */
@media (max-width: 420px){
  .book{
    padding: 16px;
    border-radius: 12px;
  }
}

/* Forms: make inputs feel clean + readable */
label{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: .95rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea,
select {
  display: block;          /* important */
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;  /* critical */
}

textarea {
  resize: vertical;
}

textarea{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

input:focus, textarea:focus, select:focus{
  outline: none;
  border-color: rgba(0,0,0,.35);
}

.form-row{ margin: .85rem 0; }
.form-actions{
  display:flex;
  gap:.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

button, .btn{
  cursor: pointer;
}

button{
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.78);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1rem;
}

button:hover{ opacity: .9; }

.notice{
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.75);
  margin: 1rem 0;
}

.notice.error{ border-color: rgba(160,0,0,.25); }
.notice.ok{ border-color: rgba(0,120,0,.22); }

.field-wide {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-list {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 15px;       /* force smaller size */
  line-height: 1.35;
}

.admin-list li {
  margin: 6px 0;
}

.admin-list .meta {
  font-size: 13px;       /* even smaller metadata */
  color: var(--muted);
}

/* Site header/footer wrapper (works with your book pages) */

.site-header{
  background: rgba(255,255,255,.75);
  border-bottom: 1px solid rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
}

.site-header-inner{
  max-width: 64rem;
  margin: 0 auto;
  padding: .75rem 1rem;
}

.site-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: .75rem 1rem;
}

brand {
  position: relative;
  text-align: center;
}

.brand-img{
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 18px;
  /* border: 1px solid rgba(0,0,0,.08); */
}

.brand-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-20px);
}

.brand-title {
  font-family: "Playfair Display", "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #f5e9d8;
  text-shadow: 0 4px 20px rgba(0,0,0,.55);
}

.brand-tagline {
  margin-top: .2rem;
  font-family: ui-sans-serif, system-ui;
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(255,255,255,.9);
}

.site-nav{
  margin-top: .35rem;
  display:flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: .9rem;
}

.site-nav a {
  text-decoration: none;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  color: rgba(0,0,0,.75);
  transition: all .2s ease;
}

.site-nav a:hover {
  background: rgba(255,255,255,.95);
  transform: translateY(-1px);
}

.site-main{
  padding: 1.25rem 0;
}

/* Footer */

.site-footer{
  margin-top: 2rem;
  border-top: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
}

.site-footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.2rem 1rem;
  text-align: center;
}

/* New link styling */
.foot-links {
  font-family: ui-sans-serif, system-ui;
  font-size: .85rem;
  margin-bottom: .6rem;
}

.foot-links a {
  text-decoration: none;
  color: rgba(80, 60, 40, .7); 
  transition: color .2s ease;
}

.foot-links a:hover {
  color: rgba(80, 60, 40, .95);
}

.foot-sep {
  margin: 0 .6rem;
  color: rgba(0,0,0,.4);
}

.foot-note{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: .9rem;
  color: rgba(0,0,0,.65);
}