:root{--blue:#2563eb;--blue2:#60a5fa;--ink:#0f2742;--muted:#64748b;--card:rgba(255,255,255,.86);--line:rgba(15,39,66,.1);--shadow:0 24px 70px rgba(15,39,66,.14);--max:1180px;--side:clamp(18px,4vw,80px)}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;color:var(--ink);background:linear-gradient(180deg,#f8fcff,#eef8ff 45%,#f7fff8);min-height:100vh}a{text-decoration:none;color:inherit}img{display:block;max-width:100%}.nav{position:sticky;top:0;z-index:10;background:rgba(248,252,255,.86);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.nav-inner{width:min(var(--max),calc(100vw - var(--side)*2));margin:auto;min-height:84px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:12px;font-weight:1000}.mark{width:44px;height:44px;border-radius:16px;background:linear-gradient(135deg,#60a5fa,#1d4ed8);color:white;display:grid;place-items:center;box-shadow:0 12px 30px rgba(37,99,235,.28)}.links{display:flex;gap:12px;flex-wrap:wrap}.btn,.links a,button{border:1px solid var(--line);background:rgba(255,255,255,.86);border-radius:999px;padding:12px 18px;font-weight:900;cursor:pointer;box-shadow:0 8px 20px rgba(15,39,66,.06)}.btn.primary,button.primary{background:linear-gradient(135deg,#60a5fa,#2563eb);color:white;border:0}.container{width:min(var(--max),calc(100vw - var(--side)*2));margin:auto;padding:34px 0 78px}.hero{position:relative;min-height:540px;border-radius:38px;overflow:hidden;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.9);background:#dff3ff}.hero-bg{position:absolute;inset:0;background:url('/images/study-garden-bg.jpg') center right/cover no-repeat;filter:saturate(1.16) contrast(1.12) brightness(1.04)}.hero-bg:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(248,252,255,.96),rgba(248,252,255,.78) 28%,rgba(248,252,255,.28) 52%,rgba(248,252,255,.02))}.hero-content{position:relative;z-index:1;width:min(570px,100%);padding:54px 58px}.badge{display:inline-flex;align-items:center;gap:9px;border:1px solid rgba(37,99,235,.13);border-radius:999px;padding:9px 14px;background:rgba(255,255,255,.82);font-weight:950;color:#1d4ed8}.badge:before{content:"";width:9px;height:9px;border-radius:50%;background:#10b981;box-shadow:0 0 0 6px rgba(16,185,129,.14)}h1{font-size:clamp(42px,5vw,72px);letter-spacing:-.08em;line-height:.96;margin:24px 0 18px}p{line-height:1.68}.search{display:flex;gap:10px;padding:9px;background:rgba(255,255,255,.9);border-radius:26px;margin-top:28px;box-shadow:0 20px 45px rgba(15,39,66,.12)}.search input{border:0;background:transparent;outline:0;flex:1;padding:14px 16px;font-size:16px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:22px}.stats div{background:rgba(255,255,255,.65);border:1px solid rgba(255,255,255,.86);border-radius:20px;padding:14px;backdrop-filter:blur(14px)}.stats b{color:#1d4ed8}.section-title{display:flex;justify-content:space-between;align-items:end;margin:44px 0 20px}.section-title h2{font-size:clamp(30px,4vw,44px);letter-spacing:-.06em;margin:0}.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.card{background:var(--card);border:1px solid rgba(255,255,255,.92);border-radius:28px;padding:18px;box-shadow:0 16px 44px rgba(15,39,66,.1);backdrop-filter:blur(16px)}.doc-card{display:flex;flex-direction:column;min-height:410px;transition:.2s}.doc-card:hover{transform:translateY(-5px);box-shadow:0 30px 75px rgba(15,39,66,.16)}.cover{height:210px;border-radius:22px;overflow:hidden;background:linear-gradient(135deg,#dbeafe,#ecfdf5);display:grid;place-items:center;color:#1d4ed8;font-weight:1000}.cover img{width:100%;height:100%;object-fit:cover}.meta{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.tag{font-size:12px;font-weight:900;border-radius:999px;padding:7px 10px;background:rgba(37,99,235,.08);color:#1d4ed8}.tag.free{background:rgba(16,185,129,.1);color:#047857}.price{font-size:25px;color:#1d4ed8;font-weight:1000}.old{text-decoration:line-through;color:#94a3b8;font-size:15px}.bottom{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px}.layout{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:start}.panel{background:var(--card);border-radius:30px;padding:28px;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.92)}.preview-list{display:grid;gap:18px}.preview-list img{width:100%;border-radius:22px;box-shadow:0 14px 35px rgba(15,39,66,.1)}.form{display:grid;gap:14px}.input,textarea,select{width:100%;border:1px solid var(--line);border-radius:16px;padding:13px 14px;background:white}.notice{padding:14px 16px;border-radius:18px;background:rgba(14,165,233,.1);color:#075985;border:1px solid rgba(14,165,233,.18)}.ad{min-height:92px;border:1px dashed rgba(37,99,235,.3);border-radius:24px;display:grid;place-items:center;color:#64748b;background:rgba(255,255,255,.55);margin:34px 0}.admin-shell{display:grid;grid-template-columns:260px 1fr;gap:22px}.side{position:sticky;top:110px}.side button{width:100%;text-align:left;margin-bottom:10px}.table{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{padding:13px;border-bottom:1px solid var(--line);text-align:left}.hidden{display:none!important}@media(max-width:1000px){.grid,.layout,.admin-shell{grid-template-columns:1fr}.hero-content{padding:42px 34px}.stats{grid-template-columns:1fr}}@media(max-width:640px){:root{--side:16px}.nav-inner{flex-direction:column;align-items:flex-start;padding:12px 0}.search{flex-direction:column}.hero{border-radius:28px}.hero-content{padding:32px 22px}h1{font-size:42px}.grid{grid-template-columns:1fr}}

/* Rendered document preview */
.preview-list{display:grid;gap:22px;margin-top:18px}.doc-page{margin:0;border-radius:22px;background:#fff;border:1px solid rgba(15,39,66,.12);box-shadow:0 16px 38px rgba(15,39,66,.12);overflow:hidden}.doc-page img{width:100%;display:block;background:#fff}.page-label{padding:10px 14px;font-weight:900;color:#1d4ed8;background:linear-gradient(90deg,#eff6ff,#fff);border-bottom:1px solid rgba(15,39,66,.08)}.locked-page{text-align:center;border-radius:26px;padding:34px 24px;background:linear-gradient(135deg,rgba(239,246,255,.96),rgba(255,247,237,.96));border:1px solid rgba(37,99,235,.14);box-shadow:0 18px 42px rgba(15,39,66,.12)}.locked-page .lock-icon{font-size:44px;margin-bottom:8px}.locked-page h3{margin:8px 0;font-size:26px;letter-spacing:-.04em}.locked-page p{color:#64748b}.status{display:inline-flex;padding:5px 10px;border-radius:999px;background:#e2e8f0;font-weight:900}.status.ok{background:#dcfce7;color:#166534}.status.err{background:#fee2e2;color:#991b1b}.status.wait{background:#fef3c7;color:#92400e}.danger{color:#b91c1c}.muted{color:#64748b}.table .btn{padding:8px 12px;border-radius:12px;background:#eff6ff;border:1px solid rgba(37,99,235,.18)}

/* =========================================================
   ADS / MONETIZATION
========================================================= */

.ad-wrap {
  width: min(100%, 980px);
  margin: 28px auto;
}

.ad-wrap.ad-horizontal {
  min-height: 110px;
}

.ad-wrap.ad-native {
  min-height: 140px;
}

.ad-label {
  width: fit-content;
  margin: 0 0 8px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ad-card {
  min-height: 96px;
  padding: 22px 24px;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ad-card strong {
  display: block;
  color: #0f2a4a;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.ad-card p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.ad-card span {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-weight: 900;
  font-size: 13px;
}

.adsbygoogle {
  display: block;
  min-height: 96px;
  border-radius: 24px;
  overflow: hidden;
}

/* =========================================================
   FULL SCREEN PREVIEW POPUP
========================================================= */

.preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.preview-head h2 {
  margin-bottom: 4px;
}

.preview-thumb {
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}

.preview-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(15, 39, 66, .18);
}

.page-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-open-small {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  box-shadow: none;
}

.preview-modal-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
}

.preview-modal.hidden {
  display: none !important;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(10px);
}

.preview-modal-panel {
  position: absolute;
  inset: 22px;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .14), transparent 35%),
    #f8fbff;
  box-shadow: 0 35px 120px rgba(0, 0, 0, .4);
  overflow: hidden;
}

.preview-modal-header {
  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(15, 39, 66, .1);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-modal-header strong {
  display: block;
  font-size: 20px;
  color: #0f2742;
}

.preview-modal-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.preview-close {
  flex: 0 0 auto;
  padding: 11px 17px;
  border-radius: 999px;
  background: #0f2742;
  color: white;
  border: 0;
}

.preview-modal-body {
  flex: 1;
  overflow: auto;
  padding: 26px;
  scroll-behavior: smooth;
}

.modal-doc-page {
  width: min(100%, 1100px);
  margin: 0 auto 28px;
  border-radius: 22px;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 55px rgba(15, 39, 66, .18);
  border: 1px solid rgba(15, 39, 66, .1);
}

.modal-doc-page img {
  width: 100%;
  height: auto;
  display: block;
  background: white;
}

.modal-page-label {
  padding: 11px 16px;
  font-weight: 900;
  color: #1d4ed8;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
  border-bottom: 1px solid rgba(15, 39, 66, .08);
}

.modal-locked-page {
  width: min(100%, 850px);
  margin: 0 auto 34px;
  padding: 38px 26px;
  text-align: center;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(255, 247, 237, .98));
  border: 1px solid rgba(37, 99, 235, .16);
  box-shadow: 0 18px 50px rgba(15, 39, 66, .16);
}

.modal-locked-page .lock-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.modal-locked-page h3 {
  margin: 8px 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.modal-locked-page p {
  color: #64748b;
}

.muted {
  color: #64748b;
}

@media (max-width: 720px) {
  .ad-wrap {
    margin: 22px auto;
  }

  .ad-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
    border-radius: 22px;
  }

  .ad-card strong {
    font-size: 16px;
  }

  .preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-modal-panel {
    inset: 8px;
    border-radius: 20px;
  }

  .preview-modal-header {
    padding: 12px;
  }

  .preview-modal-header strong {
    font-size: 16px;
  }

  .preview-modal-body {
    padding: 12px;
  }

  .modal-doc-page {
    border-radius: 16px;
    margin-bottom: 16px;
  }
}


/* =========================================================
   FULL SCREEN PREVIEW POPUP FIX
========================================================= */

.preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.preview-head h2 {
  margin-bottom: 4px;
}

.preview-thumb {
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}

.preview-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(15, 39, 66, .18);
}

.page-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-open-small {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  box-shadow: none;
}

.preview-modal-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: block;
}

.preview-modal.hidden {
  display: none !important;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(10px);
}

.preview-modal-panel {
  position: absolute;
  inset: 18px;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: #f8fbff;
  box-shadow: 0 35px 120px rgba(0, 0, 0, .4);
  overflow: hidden;
}

.preview-modal-header {
  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(15, 39, 66, .1);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-modal-header strong {
  display: block;
  font-size: 20px;
  color: #0f2742;
}

.preview-modal-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.preview-close {
  flex: 0 0 auto;
  padding: 11px 17px;
  border-radius: 999px;
  background: #0f2742;
  color: white;
  border: 0;
  cursor: pointer;
}

.preview-modal-body {
  flex: 1;
  overflow: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.modal-doc-page {
  width: min(100%, 1250px);
  margin: 0 auto 28px;
  border-radius: 22px;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 55px rgba(15, 39, 66, .18);
  border: 1px solid rgba(15, 39, 66, .1);
}

.modal-doc-page img {
  width: 100%;
  height: auto;
  display: block;
  background: white;
}

.modal-page-label {
  padding: 11px 16px;
  font-weight: 900;
  color: #1d4ed8;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
  border-bottom: 1px solid rgba(15, 39, 66, .08);
}

.modal-locked-page {
  width: min(100%, 850px);
  margin: 0 auto 34px;
  padding: 38px 26px;
  text-align: center;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(255, 247, 237, .98));
  border: 1px solid rgba(37, 99, 235, .16);
  box-shadow: 0 18px 50px rgba(15, 39, 66, .16);
}

.modal-locked-page .lock-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.modal-locked-page h3 {
  margin: 8px 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.modal-locked-page p {
  color: #64748b;
}

.muted {
  color: #64748b;
}

@media (max-width: 720px) {
  .preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-modal-panel {
    inset: 8px;
    border-radius: 20px;
  }

  .preview-modal-header {
    padding: 12px;
  }

  .preview-modal-header strong {
    font-size: 16px;
  }

  .preview-modal-body {
    padding: 12px;
  }

  .modal-doc-page {
    border-radius: 16px;
    margin-bottom: 16px;
  }
}

/* =========================================================
   FOOTER / POLICY LINKS
========================================================= */

.site-footer {
  padding: 36px 0 48px;
  color: #64748b;
  text-align: center;
}

.site-footer p {
  margin: 14px 0 0;
  font-size: 15px;
}

.site-footer a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
}

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  font-size: 14px;
}

.policy-page {
  max-width: 920px;
  margin: 0 auto;
}

.policy-page h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  margin-bottom: 18px;
}

.policy-page h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 24px;
}

.policy-page p,
.policy-page li {
  color: #334155;
  line-height: 1.8;
  font-size: 17px;
}

.policy-page ul {
  padding-left: 22px;
}

@media (max-width: 720px) {
  .footer-links {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-links a {
    display: block;
  }
}