:root {
  --ink: #181d18;
  --dark: #171a18;
  --muted: #525d53;
  --line: #d9dfd6;
  --lime: #e0ea35;
  --canvas: #f1f3ef;
  --paper: #fff;
  font: 16px/1.5 Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, ul { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #5b750e; outline-offset: 3px; }
.container { width: min(1100px, calc(100% - 3rem)); margin-inline: auto; }
.top { background: var(--dark); color: white; border-bottom: 4px solid var(--lime); }
.top-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-mark { display: grid; place-items: center; width: 47px; height: 47px; flex: none; border-radius: 12px 12px 12px 4px; background: var(--lime); color: var(--dark); font-weight: 900; font-style: italic; letter-spacing: -.06em; }
.brand strong { display: block; font-size: 1.55rem; line-height: 1.16; letter-spacing: -.055em; }
.brand small, .credit { color: #c4cec1; font-size: .85rem; }
.credit { text-decoration: none; }
.credit strong { color: var(--lime); }
.credit:hover { text-decoration: underline; }
.intro { padding-block: clamp(1.45rem, 4vw, 3rem) clamp(1.15rem, 2.5vw, 1.8rem); }
h1 { font-size: clamp(2.05rem, 5.4vw, 3.8rem); line-height: 1.06; letter-spacing: -.064em; text-wrap: balance; }
.intro p { margin-top: .55rem; color: var(--muted); max-width: 43rem; }
.layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(260px, .41fr); padding-bottom: 2.5rem; align-items: start; }
.form-stack { min-width: 0; display: grid; gap: .95rem; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1rem, 2.4vw, 1.45rem); }
h2 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.035em; }
h3 { margin: 1.28rem 0 .28rem; font-size: 1.03rem; letter-spacing: -.02em; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .72rem; margin-top: .95rem; }
label { display: grid; gap: .29rem; font-size: .9rem; font-weight: 700; min-width: 0; }
input, select, textarea { appearance: none; min-width: 0; width: 100%; min-height: 44px; color: var(--ink); background: white; border: 1px solid #c9d2c7; border-radius: 8px; padding: .55rem .65rem; font-size: 1rem; font-weight: 450; }
select { padding-right: 1.65rem; background: white linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 14px center / 5px 5px no-repeat; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #6a746a; opacity: 1; }
input[type="datetime-local"] { display: block; height: 44px; }
button { cursor: pointer; color: var(--ink); }
.primary, .secondary, .quiet, .segmented button { border-radius: 8px; padding: .57rem .72rem; font-weight: 730; min-height: 44px; border: 1px solid transparent; }
.primary { background: var(--lime); border-color: #cbd526; }
.secondary { background: white; border-color: var(--line); }
.quiet { background: transparent; text-decoration: underline; text-underline-offset: .17em; }
.primary:hover, .secondary:hover, .quiet:hover { filter: brightness(.96); }
button:disabled { cursor: default; opacity: .65; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .25rem; padding: .23rem; margin-bottom: 1rem; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; }
.segmented button { background: transparent; }
.segmented [aria-pressed="true"] { background: var(--dark); color: white; }
.hint { color: var(--muted); font-size: .88rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: .65rem; }
.photo-item { position: relative; min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: #f8faf7; }
.photo-item img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #e8ece7; border-radius: 6px; margin-bottom: .32rem; }
.photo-title { display: block; font-size: .86rem; font-weight: 750; }
.photo-control { position: relative; display: flex; justify-content: center; align-items: center; min-height: 44px; color: var(--ink); margin-top: .2rem; border: 1px dashed #b7c2b5; border-radius: 7px; font-size: .85rem; text-align: center; padding: .23rem; cursor: pointer; }
.photo-control input { position: absolute; inset: 0; height: 100%; margin: 0; opacity: 0; padding: 0; cursor: pointer; }
.photo-control:focus-within { outline: 2px solid #5b750e; outline-offset: 2px; }
.photo-remove { margin-top: .18rem; font-size: .81rem; min-height: 36px; padding-inline: .25rem; }
.photo-message { margin-top: .25rem; color: #805323; font-size: .81rem; }
.damage-list { display: grid; gap: .62rem; }
.damage-item { display: grid; gap: .62rem; padding: .68rem; margin-block: .18rem; border: 1px solid var(--line); border-radius: 10px; }
.damage-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.damage-head h4 { margin: 0; font-size: .93rem; }
.damage-item .field-grid { margin: 0; }
.damage-item .photo-item { max-width: 230px; }
#damage-add { margin-top: .55rem; }
.notes { margin-top: 1rem; }
.report { position: sticky; top: .8rem; }
.report-status { list-style: none; padding: .35rem 0 .8rem; }
.report-status li { padding: .54rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.report-status strong { display: block; }
.report-status span { color: var(--muted); }
.report .primary { display: block; width: 100%; margin-bottom: .7rem; }
.report-footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .15rem .45rem; border-top: 1px solid var(--line); margin-top: .84rem; }
.report-footer button { font-size: .88rem; padding-inline: 0; }
#export-status { margin-bottom: .55rem; color: #345528; font-weight: 700; }
@media (max-width: 740px) {
  .container { width: calc(100% - 1.6rem); }
  .layout { grid-template-columns: 1fr; }
  .report { position: static; }
  .top-inner { min-height: 78px; flex-wrap: wrap; gap: .4rem; padding-block: .65rem; }
}
@media (max-width: 430px) {
  .top-inner { align-items: flex-start; flex-direction: column; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid { column-gap: .5rem; }
}
