:root {
  --lf-green: #194832;
  --lf-cream: #fcfbf6;
  --lf-gold: #b68a4a;
}

html { scroll-behavior: smooth; }
body { min-width: 320px; }
img { max-width: 100%; }

#lf-toolbar {
  position: fixed;
  z-index: 1200;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  max-width: min(92vw, 720px);
  padding: 10px;
  border: 1px solid rgba(25,72,50,.18);
  border-radius: 16px;
  background: rgba(252,251,246,.96);
  box-shadow: 0 12px 40px rgba(18,48,35,.18);
  backdrop-filter: blur(10px);
}

#lf-toolbar button,
#lf-toolbar a {
  appearance: none;
  border: 1px solid rgba(25,72,50,.24);
  border-radius: 999px;
  background: white;
  color: var(--lf-green);
  font: 600 13px/1.2 Arial, sans-serif;
  padding: 9px 13px;
  text-decoration: none;
  cursor: pointer;
}

#lf-toolbar button:hover,
#lf-toolbar a:hover { background: #edf5ee; }

#lf-toolbar label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--lf-green);
  font: 600 13px/1.2 Arial, sans-serif;
}

.lf-selected-region {
  outline: 3px solid #e69b45 !important;
  outline-offset: 4px !important;
}

body.lf-selecting [data-la-anchor] { cursor: crosshair; }
body.lf-drawing,
body.lf-drawing * { cursor: crosshair !important; user-select: none !important; }
.lf-freehand-overlay {
  position: fixed;
  z-index: 1600;
  inset: 0;
  background: rgba(6,23,15,.18);
  touch-action: none;
}
.lf-freehand-overlay canvas { display: block; width: 100vw; height: 100vh; }
.lf-freehand-controls {
  position: fixed;
  z-index: 1601;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(252,251,246,.97);
  color: var(--lf-green);
  box-shadow: 0 12px 40px rgba(18,48,35,.24);
  font: 600 13px/1.3 Arial, sans-serif;
}
.lf-freehand-controls button {
  border: 1px solid rgba(25,72,50,.24);
  border-radius: 999px;
  padding: 8px 13px;
  background: white;
  color: var(--lf-green);
  cursor: pointer;
}
.lf-freehand-controls button[data-draw-done] { background: var(--lf-green); color: white; }
.lf-freehand-controls button:disabled { opacity: .45; cursor: not-allowed; }
.lf-freehand-preview {
  display: block;
  width: min(100%, 360px);
  height: 150px;
  margin-top: 12px;
  border: 1px solid #e4dfd0;
  border-radius: 10px;
  background: #fcfbf6;
}
.lf-freehand-preview polyline {
  fill: none;
  stroke: #e69b45;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#lf-local-dialog {
  width: min(92vw, 620px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  color: var(--lf-green);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

#lf-local-dialog::backdrop { background: rgba(5,22,14,.5); }
#lf-local-dialog form { display: grid; gap: 14px; padding: 24px; }
#lf-local-dialog h2 { margin: 0; font: 400 28px/1.15 Georgia, serif; }
#lf-local-dialog label { display: grid; gap: 6px; font: 700 13px/1.4 Arial, sans-serif; }
#lf-local-dialog input,
#lf-local-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(25,72,50,.24);
  border-radius: 10px;
  padding: 11px 12px;
  font: 15px/1.45 Arial, sans-serif;
}
#lf-local-dialog .lf-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
#lf-local-dialog button { border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
#lf-local-dialog button[type="submit"] { background: var(--lf-green); color: white; }
#lf-local-dialog .lf-note { margin: 0; color: #526b5e; font: 13px/1.45 Arial, sans-serif; }

.review-shell { max-width: 1100px; margin: 48px auto 120px; padding: 0 20px; }
.review-shell h1 { font: 400 clamp(34px,6vw,64px)/1.05 Georgia, serif; }
.review-note { padding: 16px; border-left: 4px solid var(--lf-gold); background: #f3f0e5; }
.review-list { display: grid; gap: 14px; margin-top: 24px; }
.review-entry { padding: 18px; border: 1px solid #dbe5dc; border-radius: 14px; background: white; }
.review-entry time { color: #647569; font-size: 13px; }
.review-entry p { white-space: pre-wrap; }
.review-entry small { display: block; margin-top: 8px; color: #526b5e; }
.review-entry button { margin-top: 12px; border: 1px solid #b36a5e; border-radius: 999px; padding: 7px 12px; background: #fff; color: #8d392f; cursor: pointer; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.review-actions button { border: 0; border-radius: 999px; padding: 10px 16px; background: var(--lf-green); color: white; cursor: pointer; }

@media (max-width: 720px) {
  #lf-toolbar { left: 10px; right: 10px; bottom: 10px; justify-content: center; }
  #lf-toolbar button, #lf-toolbar a { padding: 8px 10px; }
}
