:root {
  --green: #123c33;
  --forest: #185147;
  --mint: #deead7;
  --gold: #ecd18a;
  --paper: #fff;
  --bg: #f5f6f2;
  --text: #1c302b;
  --muted: #586a62;
  --line: #ccd6ca;
  --radius: 14px;
  font:
    16px/1.5 "Avenir Next",
    Avenir,
    "Segoe UI",
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: var(--green);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  font-weight: 650;
}
button:disabled {
  cursor: wait;
  opacity: 0.56;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #b39238;
  outline-offset: 3px;
}
button svg {
  flex: none;
}
button[hidden],
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  background: white;
  padding: 0.65rem;
  z-index: 50;
}
.skip:focus {
  top: 0;
}
.mast {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.mast-inner,
main,
.page-foot {
  width: min(1200px, 100%);
  margin: auto;
  padding-inline: clamp(18px, 4vw, 58px);
}
.mast-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 19px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  text-decoration: none;
  font:
    700 2.15rem/0.95 Georgia,
    serif;
  letter-spacing: -0.09rem;
}
.brand img {
  border-radius: 10px;
}
.mast-label {
  font-size: 0.93rem;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 19px;
}
.mast-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mast-actions select {
  width: auto;
  background-color: #fff;
  min-height: 38px;
  padding-block: 0.3rem;
}
.quiet {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 0.35rem 0.75rem;
}
main {
  min-height: calc(100dvh - 160px);
  padding-block: clamp(24px, 4.1vw, 52px);
}
.page-foot {
  padding-block: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
.page-foot span:first-child {
  font:
    700 1.2rem Georgia,
    serif;
  color: var(--green);
}
.loading {
  padding: 8vh 0;
  font-size: 1.2rem;
}
.entry {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 5px 28px #142f2110;
}
.intro {
  background: var(--green);
  color: white;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.intro-copy {
  padding: clamp(25px, 4.6vw, 60px) clamp(25px, 4vw, 48px) 0;
}
.eyeline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--muted);
}
.intro .eyeline,
.dash-banner .eyeline {
  color: #d1e0c7;
}
.intro h1,
.dash-banner h1,
.page-title {
  font:
    normal clamp(2.65rem, 5vw, 4.25rem) / 1.03 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.045em;
}
.intro h1 {
  margin: 20px 0 15px;
  max-width: 10em;
}
.intro p {
  max-width: 31em;
  color: #dce7de;
  line-height: 1.58;
}
.intro-art {
  width: 100%;
  height: clamp(175px, 20vw, 241px);
  object-fit: cover;
  object-position: center;
  margin-top: auto;
  display: block;
}
.entry-side {
  padding: clamp(23px, 3.8vw, 48px);
  align-self: center;
}
.entry-side h2,
.section-head h2,
.panel h2,
.panel-heading {
  font:
    normal clamp(1.65rem, 2.8vw, 2.2rem) / 1.12 Georgia,
    serif;
  letter-spacing: -0.036em;
}
.entry-side p,
.subtle,
.caption {
  color: var(--muted);
}
.entry-side p {
  margin: 0.6rem 0 1.25rem;
}
.button,
.tabs button,
.role-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  padding: 0.63rem 1rem;
  min-height: 44px;
  text-decoration: none;
  line-height: 1.3;
}
.button.primary,
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.button.primary:hover {
  background: #24584b;
}
.button.danger {
  color: #913913;
  border-color: #d2a38f;
}
.button:hover,
.quiet:hover,
.role-link:hover,
summary:hover {
  border-color: #6e957d;
}
.wide {
  width: 100%;
}
.stack {
  display: grid;
  gap: 14px;
}
.split-line {
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.entry-side details {
  margin-top: 15px;
}
.entry-side details summary {
  color: var(--green);
  font-weight: 650;
}
.entry-side details form {
  padding-top: 15px;
}
.sandbox {
  margin-top: 24px;
  padding: clamp(18px, 2.7vw, 30px);
  border: 1px solid var(--line);
  background: #fdfefa;
  border-radius: var(--radius);
}
.sandbox .section-head {
  margin: 0 0 14px;
}
.role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 110px;
  flex: 1;
  text-align: left;
  font-size: 0.93rem;
}
.role-link small,
.mini {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.dash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--green);
  color: white;
  border-radius: var(--radius);
  padding: clamp(23px, 3.9vw, 43px);
  position: relative;
  overflow: hidden;
}
.dash-banner:after {
  position: absolute;
  content: "";
  inset: 0 0 0 58%;
  background: url("/survey.svg") center/cover;
  opacity: 0.44;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent, #000 28%);
}
.dash-banner > * {
  position: relative;
  z-index: 1;
}
.dash-banner h1 {
  margin: 9px 0;
  font-size: clamp(2.25rem, 4vw, 3.55rem);
}
.dash-banner p {
  color: #e1e9de;
}
.dash-banner .button {
  background: #e6efc1;
  border-color: #e6efc1;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
}
.tabs button {
  background: transparent;
  border: 0;
  color: var(--muted);
}
.tabs button[aria-current="page"] {
  background: #dce8d9;
  color: var(--green);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 15px;
}
.section-head h2 {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 16px;
}
.panel,
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: clamp(18px, 2.6vw, 28px);
}
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.card h3,
.item-title {
  font-size: 1.22rem;
  line-height: 1.25;
}
.card .button {
  margin-top: auto;
}
.panel + .panel {
  margin-top: 15px;
}
.panel h2,
.panel h3 {
  margin-bottom: 12px;
}
.row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.panel .button-row {
  margin-top: 13px;
}
.tag {
  display: inline-block;
  border-radius: 6px;
  background: #e5eee0;
  color: #31553c;
  padding: 0.19rem 0.55rem;
  font-size: 0.84rem;
  font-weight: 650;
}
.hint {
  padding: 11px 14px;
  border-left: 3px solid #c6a44d;
  background: #faf5e6;
  color: #564a26;
}
.empty {
  margin: 10px 0;
  border: 1px dashed #aabaaa;
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--muted);
  background: #f9faf7;
}
.label {
  font-size: 0.88rem;
  font-weight: 650;
  color: #374e42;
}
.item {
  padding: 15px 0;
  border-bottom: 1px solid #e1e6de;
}
.item:last-child {
  border-bottom: 0;
}
.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr));
  gap: 13px 26px;
  margin: 15px 0;
}
.kv dt {
  color: var(--muted);
  font-size: 0.87rem;
}
.kv dd {
  margin: 2px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.section-title {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.25rem;
}
form {
  display: grid;
  gap: 13px;
  max-width: 740px;
}
label.field {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 0.92rem;
}
input:not([type="checkbox"]),
textarea,
select {
  border: 1px solid #aab9a9;
  border-radius: 7px;
  padding: 0.62rem 0.75rem;
  background: white;
  width: 100%;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.checks input {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
}
fieldset {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.keys {
  font:
    600 1.05rem ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.back {
  margin: 0 0 14px;
}
.status {
  font-size: 0.86rem;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  z-index: 1100;
  max-width: calc(100% - 26px);
  width: max-content;
  box-shadow: 0 5px 20px #142f2140;
}
.toast.error {
  background: #7b331d;
}
.cam {
  background: #192821;
  border-radius: 10px;
  width: 100%;
  max-height: 330px;
}
.viewer {
  margin-top: 12px;
}
.viewer-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.paper-mat {
  background: #dee3dd;
  padding: clamp(8px, 2vw, 22px);
  max-height: 80vh;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 9px;
}
.paper-mat img {
  display: block;
  margin: auto;
  width: min(100%, 820px);
  box-shadow: 0 3px 12px #1e342c22;
}
.paper-mat.zoom img {
  width: 1050px;
  max-width: none;
}
.map-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 9px;
}
.map {
  min-height: 360px;
  height: min(54vh, 530px);
}
.caption {
  font-size: 0.9rem;
  margin-top: 8px;
}
.audit-list {
  padding: 0;
  list-style: none;
}
.audit-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.compact {
  margin-top: 8px;
}
.switch {
  display: inline-flex;
  gap: 2px;
  background: #eaf0e7;
  padding: 3px;
  border-radius: 8px;
}
.switch button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--muted);
}
.switch button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 3px #1e342c25;
}
.role-select {
  max-width: 220px;
}
.protected {
  user-select: none;
  -webkit-touch-callout: none;
}
.wordbreak {
  overflow-wrap: anywhere;
}
details > summary {
  cursor: pointer;
}
.owner-rows {
  display: grid;
  gap: 8px;
}
.form-error {
  color: #8d3419;
}
.form-announce {
  padding: 12px;
  background: #eaf2e4;
  border: 1px solid #a9bba4;
  border-radius: 8px;
}
.grant-grid .item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
@media (max-width: 760px) {
  .entry {
    grid-template-columns: 1fr;
  }
  .intro {
    min-height: 190px;
  }
  .intro-copy {
    position: relative;
    z-index: 1;
    width: 80%;
    padding: 26px;
  }
  .intro-art {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 48%;
    height: 100%;
    opacity: 0.36;
    mask-image: linear-gradient(to right, transparent, black 40%);
  }
  .intro h1 {
    font-size: 2.45rem;
    margin: 12px 0;
  }
  .entry-side {
    padding: 24px;
  }
  .dash-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .mast-label {
    display: none;
  }
  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .tabs {
    gap: 2px;
  }
  .tabs button {
    padding: 9px;
    font-size: 0.92rem;
  }
}
@media (max-width: 480px) {
  .mast-inner {
    min-height: 63px;
    gap: 8px;
  }
  .mast-actions {
    gap: 4px;
  }
  .mast-actions select,
  .quiet {
    font-size: 0.86rem;
  }
  .dash-banner,
  .panel,
  .card {
    padding: 18px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .intro-copy {
    width: 96%;
    padding: 21px;
  }
  .intro h1 {
    font-size: 2.1rem;
  }
  .page-foot {
    gap: 10px;
    font-size: 0.76rem;
  }
  .map {
    min-height: 290px;
  }
  .mark-layer {
    gap: 10px;
  }
  .section-head h2 {
    font-size: 1.55rem;
  }
  .tabs {
    margin: 12px 0 17px;
  }
}
@media print {
  html,
  body {
    background: white !important;
  }
  body > * {
    display: none !important;
  }
  body:after {
    display: block;
    content: "Lote · Protected viewing session / Protektadong sesyon";
    color: black;
    font: 14pt sans-serif;
  }
}
.field-mobile .tabs button svg{display:none}
@media screen and (max-width: 780px), screen and (display-mode: standalone){
  body.field-mobile{padding-bottom:calc(86px + env(safe-area-inset-bottom));scroll-padding-bottom:86px}
  .field-mobile .tabs{position:fixed;inset:auto 0 0;z-index:1500;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0;padding:5px max(8px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border:0;border-top:1px solid #c4d1c9;border-radius:0;background:#fff;box-shadow:0 -2px 12px #163c2d0d;overflow:visible}
  .field-mobile .tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:55px;padding:4px 0;gap:3px;border:0;border-radius:8px;color:#3e554a;font-size:.78rem;line-height:1.15;white-space:normal;background:transparent}
  .field-mobile .tabs button svg{display:block}
  .field-mobile .tabs button[aria-current="page"]{color:#103e32;background:#e4efe7;border:0;font-weight:700}
  .field-mobile .toast{bottom:calc(82px + env(safe-area-inset-bottom))}
}

.register-head { flex-wrap:wrap; }
.layout-choice { display:inline-flex; gap:2px; padding:3px; border:1px solid var(--line); border-radius:10px; background:white; }
.layout-choice button { min-height:40px; padding:5px 15px; border:0; border-radius:7px; background:transparent; color:var(--muted); }
.layout-choice [aria-pressed="true"] { background:var(--green); color:white; }
.register-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin-bottom:14px; }
.register-filters .field { flex:1 1 10rem; min-width:0; margin:0; }
.register-filters .field:first-child { flex:2 1 18rem; }
.register-count { color:var(--muted); font-size:.9rem; margin:12px 0; }
.register-records { list-style:none; margin:0; padding:0; }
.register-record { min-width:0; background:white; overflow-wrap:anywhere; }
.register-record h3 { font-size:1.12rem; line-height:1.4; }
.register-ref { display:block; font-size:.82rem; font-weight:650; color:var(--muted); margin-bottom:4px; }
.register-parcel small { display:block; color:var(--muted); margin-top:4px; }
.register-records.cards .register-record { display:flex; flex-direction:column; align-items:flex-start; gap:14px; border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.register-records.cards .button { margin-top:auto; }
.register-records.list { border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.register-records.list .register-record { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) auto; align-items:center; gap:14px; padding:14px 18px; }
.register-records.list > li + li { border-top:1px solid var(--line); }
@media (max-width:600px) {
  .register-records.list .register-record { grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; padding:12px; }
  .register-records.list .register-parcel { grid-row:2; font-size:.85rem; }
  .register-records.list .button { grid-column:2; grid-row:1 / span 2; }
}

.register-owners { list-style:none; padding:0; margin:0; display:grid; gap:5px; }
.register-owners li { display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; }
.register-owners small { color:var(--muted); }
.owner-enroll { color:var(--forest); background:white; border:1px solid var(--line); border-radius:6px; padding:3px 10px; min-height:32px; font-size:.86rem; }
.owner-enroll:hover { background:var(--mint); }
.enroll-context { margin-bottom:16px; padding:12px 15px; border-left:3px solid var(--forest); background:#eff5ed; }
