body.note-locked .layout {
  visibility: hidden;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #ffffff;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.05), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(196, 92, 0, 0.04), transparent);
}

body:not(.note-locked) .access-gate {
  display: none;
}

.access-gate__card {
  width: min(100%, 380px);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 40px rgba(26, 31, 46, 0.08);
}

.access-gate__label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5c6678;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.access-gate__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a1f2e;
  font-family: "Noto Serif SC", Georgia, serif;
}

.access-gate__hint {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #5c6678;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.access-gate__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.access-gate__field {
  position: relative;
}

.access-gate__input {
  width: 100%;
  padding: 0.7rem 2.75rem 0.7rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  font-size: 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: #1a1f2e;
  background: #f7f8fa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.access-gate__toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  color: #5c6678;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.access-gate__eye {
  width: 1.125rem;
  height: 1.125rem;
}

.access-gate__eye--hide {
  display: none;
}

.access-gate__toggle[aria-pressed="true"] .access-gate__eye--show {
  display: none;
}

.access-gate__toggle[aria-pressed="true"] .access-gate__eye--hide {
  display: block;
}

.access-gate__toggle:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.access-gate__toggle[aria-pressed="true"] {
  color: #2563eb;
}

.access-gate__input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}

.access-gate__btn {
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
  transition: background 0.2s;
}

.access-gate__btn:hover {
  background: #1d4ed8;
}

.access-gate__error {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.85rem;
  color: #dc2626;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.media-wrap {
  position: relative;
  display: block;
  line-height: 0;
}

.media-wrap img {
  display: block;
  width: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.media-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  cursor: default;
}

.watermark-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-repeat: repeat;
  background-size: var(--watermark-tile-w, 1040px) var(--watermark-tile-h, 680px);
}

body.mobile-toc-open {
  overflow: hidden;
}
