:root {
  --bg: #f6f4ef; --panel: #fff; --ink: #1f2328; --muted: #6b6f76; --line: #e3dfd6;
  --accent: #c2581c; --accent-ink: #fff; --ok: #2f7d4f; --warn: #b42318; --soft: #fbf3ec;
  --paper: #fff8dc; --paper-line: #efe3b8; --blue: #2747a0; --blue-soft: #e7eefc; --amber: #8a5a00; --amber-soft: #fff2d6;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: var(--accent); }
h1 { margin: 0 0 .5rem; font-size: 1.8rem; }
h2 { margin: 0 0 .75rem; font-size: 1.2rem; }
h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; }
code { background: #f0ece4; padding: 0 .25em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: 0 1.5rem; background: var(--ink); box-shadow: 0 1px 0 rgb(0 0 0 / .2), 0 4px 12px -6px rgb(0 0 0 / .35); }
.topbar nav { display: flex; gap: .4rem; flex-shrink: 0; }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; white-space: nowrap; }
:root { --topbar-h: 3.25rem; }
[id] { scroll-margin-top: calc(var(--topbar-h) + .75rem); }
@media (max-width: 520px) { .topbar { padding: 0 1rem; } .topbar .btn { padding: .3rem .5rem; font-size: .8rem; } .wide-only { display: none; } }
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.flash { padding: .6rem .9rem; border-radius: 8px; margin: 0 0 1rem; }
.flash-notice { background: #e8f3ec; color: #1d4d31; }
.flash-alert { background: #fdecea; color: var(--warn); }

.btn { display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: .5rem .9rem; border-radius: 8px; font: inherit; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-small { padding: .3rem .65rem; font-size: .875rem; }
.btn-tiny { padding: .15rem .45rem; font-size: .8rem; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-on { background: var(--ok); border-color: var(--ok); }
.btn-danger { background: var(--warn); border-color: var(--warn); }
.icon { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: .1rem .35rem; border-radius: 4px; }
.icon:hover { background: var(--soft); color: var(--ink); }
form.button_to { display: inline; }

.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; background: #ece8df; color: var(--muted); }
.badge-planning { background: #e7eefc; color: #2747a0; }
.badge-ready { background: #fff2d6; color: #8a5a00; }
.badge-in_progress { background: #fde7da; color: var(--accent); }
.badge-done { background: #e3f1e8; color: var(--ok); }
.tag { font-size: .7rem; padding: 0 .3rem; border-radius: 4px; background: #eef; color: #445; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; color: inherit; text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card h2 { margin: .4rem 0; }
.card-top { display: flex; justify-content: space-between; font-size: .85rem; }
.progress { height: 6px; background: #eee9df; border-radius: 3px; overflow: hidden; margin: .75rem 0; }
.progress div { height: 100%; background: var(--ok); }
.mini-stats { display: flex; gap: 1.25rem; margin: 0; }
.mini-stats dt, .stats dt { font-size: .75rem; color: var(--muted); }
.mini-stats dd, .stats dd { margin: 0; font-weight: 600; }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 2rem; text-align: center; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.page-head p { margin: 0 0 .25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.stats dd { font-size: 1.25rem; }
.stats .over { border-color: var(--warn); }
.stats .over dd { color: var(--warn); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; margin-bottom: 1rem; }
.notes { background: var(--soft); border-radius: 8px; padding: .25rem .9rem; margin-bottom: .75rem; }

.steps { list-style: none; padding: 0; margin: 0 0 .75rem; }
.step { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: start; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.step summary { cursor: pointer; display: flex; gap: .5rem; align-items: baseline; }
.step.done .step-title { text-decoration: line-through; color: var(--muted); }
.check { width: 1.4rem; height: 1.4rem; border: 2px solid var(--line); border-radius: 5px; background: #fff; color: var(--ok); cursor: pointer; font-weight: 700; line-height: 1; padding: 0; }
.step.done .check { border-color: var(--ok); }
.step-tools { white-space: nowrap; }

.form { display: grid; gap: .75rem; max-width: 720px; }
.form label { display: grid; gap: .25rem; font-size: .875rem; color: var(--muted); }
.form input[type=text], .form input[type=number], .form input[type=url], .form select, .form textarea {
  font: inherit; color: var(--ink); padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.form .row { display: flex; gap: .75rem; }
.form .row > * { flex: 1; }
.form .actions { display: flex; gap: .5rem; }
.form.compact { margin-top: .5rem; gap: .5rem; }
.form.inline { display: flex; gap: .5rem; max-width: none; align-items: center; }
.form.inline.wrap { flex-wrap: wrap; }
.form.inline input[type=text], .form.inline input[type=url] { flex: 1; min-width: 10rem; }
.form .narrow { max-width: 5.5rem; min-width: 4rem !important; flex: 0 0 auto !important; }
.form .narrow-ish { max-width: 10rem; }
.check-label { display: flex !important; align-items: center; gap: .35rem; white-space: nowrap; }

.item { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .6rem; }
.item.owned { background: #fafaf7; }
.item-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.item details { margin: .4rem 0; }
.item summary { cursor: pointer; color: var(--accent); }
.item-tools { display: flex; gap: .4rem; align-items: center; }
.offers { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .9rem; }
.offers th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--line); padding: .3rem; }
.offers td { padding: .35rem .3rem; border-bottom: 1px solid #f0ece4; vertical-align: top; }
.offers tr.chosen td { background: #f1f8f3; }
.offers .num { text-align: right; white-space: nowrap; }
.offers .row-tools { white-space: nowrap; text-align: right; }
.offer-details { display: block; }
.tag-unsure { background: #fdf0d5; color: #7a5200; cursor: help; }

.dialog { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; max-width: min(28rem, calc(100vw - 2rem)); width: 100%; background: var(--panel); color: var(--ink); }
.dialog::backdrop { background: rgb(31 35 40 / .35); }
.dialog h3 { margin-top: 0; }
.dialog p { margin: 0; }

/* Files & inspiration */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tile { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.tile-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--soft); text-decoration: none; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-icon { font-size: 2.5rem; }
.tile figcaption { padding: .5rem .6rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.tile figcaption strong { overflow-wrap: anywhere; }
.tile-head { display: flex; justify-content: space-between; align-items: center; }
.asset-forms { display: grid; gap: .5rem; }
.asset-forms input[type=url] { flex: 1 1 16rem; min-width: 0; }
.card-cover { width: calc(100% + 2rem); margin: -1rem -1rem .75rem; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 12px 12px 0 0; }

/* Rooms & takeoff */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.room { display: grid; grid-template-columns: 150px 1fr; gap: .75rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; min-width: 0; }
.room-body { min-width: 0; }
.room-body p { margin: .2rem 0; }
.room-plan { width: 150px; height: auto; }
.room-floor { fill: var(--soft); stroke: var(--ink); stroke-width: 2; }
.room-dim { font-size: 11px; fill: var(--muted); }
.room-area { font-size: 12px; font-weight: 600; fill: var(--ink); }
.finishes { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding: .5rem .75rem; }
.takeoff td:first-child { white-space: nowrap; }
@media (max-width: 520px) { .room { grid-template-columns: 1fr; } .room-plan { width: 100%; max-width: 220px; } .takeoff td:first-child { white-space: normal; } }
.warn { color: var(--warn); }

/* Step ↔ item links */
.step summary { flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; width: 100%; }
.chip { font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: #e7eefc; color: #2747a0; }
.chip-tool { background: #ece8df; color: var(--muted); }
.chip-safety { background: var(--amber-soft); color: var(--amber); }
.item-picks { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.item-picks .pick { font-size: .85rem; display: inline-flex; align-items: center; gap: .3rem; }

/* AI plan review */
.review-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.suggestion { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: .5rem .75rem; }
.suggestion p { margin: .2rem 0 0; }
.suggestion-remove_item { border-left-color: var(--warn); }
.suggestion-note { border-left-color: var(--amber); background: #fffcf3; }
.suggestion-link { border-left-color: var(--line); }
.badge-add_item, .badge-add_step { background: var(--blue-soft); color: var(--blue); }
.badge-remove_item { background: #fdecea; color: var(--warn); }
.badge-note { background: var(--amber-soft); color: var(--amber); }
.suggestion-actions { display: flex; gap: .25rem; flex-shrink: 0; }
.review-tools { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Contractor interview */
.interview-round summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.question { border: 0; border-top: 1px solid var(--line); padding: .75rem 0; margin: 0; display: grid; gap: .4rem; }
.question legend { font-weight: 600; padding: 0; margin-bottom: .2rem; float: left; width: 100%; }
.question .choices { display: flex; flex-wrap: wrap; gap: .4rem; }
.question .choices .pick { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; display: inline-flex; gap: .35rem; align-items: center; }
.question .not-sure { font-size: .85rem; color: var(--muted); display: inline-flex; gap: .35rem; align-items: center; }
.answer-photo { max-width: 220px; border-radius: 8px; }
.interview-actions { display: flex; flex-wrap: wrap; gap: .5rem; position: sticky; bottom: 0; background: var(--bg, #fff); padding: .5rem 0; }


/* Project page: header, then steps and shopping side by side; reference material lives in drawers */
.container-wide { max-width: none; }
.project-page { max-width: 1600px; margin: 0 auto; }
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.project-head p { margin: 0 0 .25rem; }
.lede { font-size: 1.05rem; max-width: 65ch; }
.head-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.head-bar .summary { margin: 0; flex: 1 1 24rem; }
.drawer-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.drawer-button { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .875rem; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; cursor: pointer; }
.drawer-button:hover { border-color: var(--accent); color: var(--accent); }
.dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); }
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .work { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .project-head h1 { font-size: 1.4rem; }
  .project-head .lede { font-size: .95rem; }
}

/* Drawers */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(620px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  border: 0; padding: 0; border-radius: 14px 0 0 14px; background: var(--bg); color: var(--ink); box-shadow: -8px 0 30px rgb(0 0 0 / .18); overflow: hidden; }
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .18s ease-out; }
.drawer::backdrop { background: rgb(31 35 40 / .3); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.1rem; }
.drawer-head .icon { font-size: 1.1rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem 2rem; overscroll-behavior: contain; }
.galleries { display: grid; gap: 1rem; align-content: start; }
@media (max-width: 620px) { .drawer { border-radius: 0; } }

/* Step ↔ item links: point at one, its partners light up */
.step-uses { white-space: nowrap; }
.work .step, .work .item { transition: opacity .12s, background-color .12s; }
.work.linking .step:not(.linked), .work.linking .item:not(.linked) { opacity: .4; }
.work .linked { background: var(--blue-soft); }
.work .step.linked { border-radius: 6px; }

.gallery-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .7rem .8rem .55rem; }
.gallery-head h2 { margin: 0; font-size: 1.05rem; }
.stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); margin: 0; }
.stage-slide { position: absolute; inset: 0; }
.stage-open { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: inherit; text-decoration: none; cursor: zoom-in; }
.stage-source { position: absolute; top: .5rem; left: .5rem; padding: .35rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: var(--panel); color: var(--ink); text-decoration: none; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.stage-source:hover { color: var(--accent); }
.stage-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-icon { font-size: 3rem; }
.stage-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem .65rem .45rem; font-size: .8rem; color: #fff;
  background: linear-gradient(transparent, rgb(0 0 0 / .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-tag { display: inline-block; margin-right: .3rem; padding: 0 .4rem; border-radius: 999px; background: rgb(255 255 255 / .25); font-size: .7rem; }
.stage-zoom { position: absolute; top: .4rem; right: .4rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 6px;
  background: rgb(0 0 0 / .45); color: #fff; opacity: 0; transition: opacity .15s; }
.stage-slide:hover .stage-zoom, .stage-open:focus-visible .stage-zoom { opacity: 1; }
.stage-empty { aspect-ratio: auto; min-height: 7rem; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem 1.5rem; margin: 0 .8rem; border: 2px dashed var(--line); border-radius: 8px; background: transparent; }
.filmstrip { display: flex; gap: .35rem; overflow-x: auto; padding: .45rem .8rem .1rem; scrollbar-width: thin; }
.film { flex: 0 0 auto; width: 64px; aspect-ratio: 4 / 3; border-radius: 5px; overflow: hidden; background: var(--soft); border: 2px solid transparent;
  display: grid; place-items: center; text-decoration: none; opacity: .7; }
.film img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film:hover { opacity: 1; }
.film[aria-current] { border-color: var(--accent); opacity: 1; }
.gallery-add { padding: .5rem .8rem .7rem; }
.gallery-add > summary { list-style: none; }
.gallery-add[open] > summary { margin-bottom: .4rem; }
.gallery-add .form + .form { margin-top: .4rem; }
.gallery-add input[type=file] { min-width: 0; flex: 1 1 100%; font-size: .8rem; }

/* Enlarged image */
.lightbox { border: 0; padding: 0; width: min(1100px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); border-radius: 12px; background: var(--panel);
  color: var(--ink); overflow: auto; }
.lightbox::backdrop { background: rgb(15 17 20 / .8); }
.lightbox-frame { position: relative; background: #111; height: min(72dvh, 760px); }
.lightbox-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.lightbox-icon { display: grid; place-items: center; font-size: 5rem; }
.lightbox-nav, .lightbox-close { position: absolute; border: 0; background: rgb(0 0 0 / .5); color: #fff; cursor: pointer; font: inherit; border-radius: 999px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 2.6rem; height: 2.6rem; font-size: 1.6rem; line-height: 1; }
.lightbox-prev { left: .6rem; }
.lightbox-next { right: .6rem; }
.lightbox-close { top: .6rem; right: .6rem; width: 2.2rem; height: 2.2rem; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgb(0 0 0 / .75); }
.lightbox-body { display: grid; gap: .5rem; padding: .8rem 1rem 1rem; }
.lightbox-body p { margin: .25rem 0 0; }
.lightbox-body strong { margin: 0 .4rem; }
.lightbox-body summary { cursor: pointer; color: var(--accent); }
.lightbox-body .actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Project summary: one line of facts, a thin progress bar, quiet hints */
.summary { margin: 0 0 1.25rem; }
.facts { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; color: var(--muted); font-size: .9rem; }
.facts strong { color: var(--ink); font-size: 1.05rem; margin-right: .15rem; }
.facts .warn strong { color: var(--warn); }
.summary .progress { height: 4px; margin: .6rem 0 0; max-width: 32rem; }
.hints { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .5rem; }
.hint { font-size: .825rem; }
.hint[open] { flex-basis: 100%; background: var(--panel); border-radius: 8px; padding: .3rem .6rem; }
.hint summary { cursor: pointer; color: var(--amber); list-style: none; }
.hint summary::-webkit-details-marker { display: none; }
.hint summary::before { content: "• "; }
.hint ul { margin: .35rem 0 .2rem; padding-left: 1.1rem; columns: 14rem; }

/* Project brief: collapsed by default, sectioned when open */
.brief > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.brief > summary::-webkit-details-marker { display: none; }
.brief[open] > summary { margin-bottom: .75rem; }
.brief[open] .brief-toggle { visibility: hidden; }
.brief-toggle { color: var(--accent); }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.brief-card { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; }
.brief-card h3 { margin: 0 0 .3rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.brief-card ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.brief-card li + li { margin-top: .2rem; }
.brief-card-check { background: var(--amber-soft); border-color: #f0dca8; }
.brief-card-check h3 { color: var(--amber); }
.brief-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .6rem; }

/* Plan approach */
.approach { margin: 0 0 .75rem; padding: .5rem .75rem; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 0 8px 8px 0; font-size: .9rem; }
.approach details { margin-top: .25rem; }
.approach summary { cursor: pointer; color: var(--accent); font-size: .8rem; }
.approach strong { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }

/* My notes: a notepad, not another panel */
.notepad { align-self: start; margin-bottom: 1rem; padding: .9rem 1.1rem 1.1rem; border-radius: 4px 4px 4px 18px; background: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 1.55rem, var(--paper-line) 1.55rem calc(1.55rem + 1px));
  background-position: 0 2.6rem; box-shadow: 0 1px 0 #e9dcae, 0 6px 14px -8px rgb(120 90 0 / .35); transform: rotate(-.4deg); }
.notepad-head { display: flex; justify-content: space-between; align-items: center; }
.notepad-head h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.notepad-text { margin: 0; line-height: 1.55rem; }
.notepad-text + .notepad-text { margin-top: 1.55rem; }

/* Tools, safety & materials */
.gear-groups { display: grid; gap: 1rem; }
.gear { border-top: 3px solid var(--line); padding-top: .4rem; }
.gear-tool { border-top-color: #b9b2a3; }
.gear-safety { border-top-color: #e3b341; }
.gear-material { border-top-color: var(--blue); }
.gear-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
.gear-head h3 { margin: 0; }
.count { display: inline-block; min-width: 1.4rem; text-align: center; font-size: .75rem; padding: 0 .35rem; border-radius: 999px; background: #ece8df; color: var(--muted); vertical-align: middle; }
.safety-tips { margin: 0 0 .5rem; padding: .45rem .75rem .45rem 1.9rem; background: var(--amber-soft); border-radius: 8px; color: #5c3d00; font-size: .875rem; }
.safety-tips li::marker { content: "⚠ "; }
.have { margin-top: .25rem; }
.have > summary { cursor: pointer; color: var(--ok); padding: .25rem 0; }
.add-item { margin-top: 1rem; }
.add-item > summary { list-style: none; }
.add-item[open] > summary { margin-bottom: .5rem; }
.item { padding: .45rem .7rem; margin-bottom: .35rem; }
.item-row { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.item-main { min-width: 0; }
.item-cost { display: flex; align-items: baseline; gap: .4rem; white-space: nowrap; }
.item .item-more { margin: 0; }
.item .item-more > summary.item-row { list-style: none; cursor: pointer; color: var(--ink); min-height: 1.9rem; }
.item-more > summary.item-row::-webkit-details-marker { display: none; }
.item-more[open] > summary.item-row { margin-bottom: .5rem; }
.item:has(.item-more[open]) { background: var(--soft); }
.no-price { opacity: .6; }
.store-link { color: var(--muted); text-decoration: underline dotted; }
.price-fill { display: inline-flex; gap: .25rem; justify-content: flex-end; }
.price-fill input { width: 5rem; padding: .15rem .3rem; font-size: .85rem; }
.store-search { color: var(--muted); margin: .4rem 0; }
.store-search a + a::before { content: "·"; color: var(--muted); margin: 0 .35rem; display: inline-block; text-decoration: none; }
.item-more .item-tools { flex-wrap: wrap; margin-top: .5rem; }
@media (max-width: 520px) { .item-row { flex-direction: column; align-items: flex-start; gap: .2rem; } }

/* Inventory: add a bought item, quick-add common tools */
.stock-form { margin-top: .5rem; }
.stock-form > summary { list-style: none; display: inline-block; cursor: pointer; }
.stock-form > summary::-webkit-details-marker { display: none; }
.stock-form .form { margin-top: .5rem; max-width: 28rem; }
.common-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .3rem .75rem; margin: .5rem 0; }
.common-list .check-label { white-space: normal; }

/* Project page panels: whitespace and a soft lift instead of hard borders */
.project-page .panel, .drawer .gallery-panel, .drawer .room { border-color: transparent; box-shadow: 0 1px 2px rgb(31 35 40 / .06), 0 2px 8px -4px rgb(31 35 40 / .08); }
.project-page .panel { padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.work > .panel { margin-bottom: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.panel-head h2 { margin: 0; }
.project-head h1 { line-height: 1.2; }
.project-head .lede { color: var(--muted); margin-top: .25rem; }

/* Quieter rows: row tools show on hover where there is a mouse */
@media (hover: hover) {
  .work .step-tools { opacity: 0; transition: opacity .12s; }
  .work .step:hover .step-tools, .work .step:focus-within .step-tools { opacity: 1; }
  .work .item-bought { opacity: 0; transition: opacity .12s; }
  .work .item:hover .item-bought, .work .item-bought:focus-visible { opacity: 1; }
  .work .item:hover > .item-more > summary strong:first-child { color: var(--accent); }
}
.work .item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: .5rem .35rem; }
.work .item.owned { background: transparent; }
.step-num { min-width: 1.1rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps-done { margin: -.25rem 0 .75rem; }
.steps-done > summary { cursor: pointer; color: var(--ok); padding: .35rem 0; }
.steps-done .steps { margin-bottom: 0; opacity: .75; }
.add-room { margin: .25rem 0 1rem; }
.add-room > summary { list-style: none; display: inline-block; cursor: pointer; }
.add-room > summary::-webkit-details-marker { display: none; }
.add-room[open] > summary { margin-bottom: .6rem; }
.step summary { display: block; }
.step summary > * + * { margin-left: .35rem; }
.step-num { display: inline-block; }

/* Share from the phone: one tap on a project saves the link */
.share { max-width: 32rem; margin: 0 auto; }
.share h1 { font-size: 1.4rem; }
.share-link { background: var(--panel); border-radius: 10px; padding: .7rem .9rem; margin: 0 0 1rem; display: grid; gap: .15rem; overflow-wrap: anywhere; }
.share-form { max-width: none; }
.share-note summary { cursor: pointer; color: var(--accent); }
.share-note textarea { margin-top: .4rem; }
.share-projects { display: grid; gap: .5rem; }
.share-project { display: grid; gap: .1rem; text-align: left; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: .85rem 1rem; cursor: pointer; }
.share-project:hover, .share-project:focus-visible { border-color: var(--accent); }
.share-project:active { background: var(--soft); }
.share-done { text-align: center; padding-top: 2rem; }
.share-done .actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.share-tick { font-size: 2.5rem; color: var(--ok); margin: 0; }
.share-note > summary { list-style: none; }
.share-note > summary::-webkit-details-marker { display: none; }
.share-new { display: flex; gap: .5rem; }
.share-new input { flex: 1; min-width: 0; }
.copy-to > summary { cursor: pointer; color: var(--accent); }
.copy-to .form { margin-top: .4rem; }
.copy-to select { font: inherit; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; flex: 1 1 12rem; }

/* A project that's just a name and pictures so far */
.start h2 { margin-top: 1rem; }
.start .form { max-width: 40rem; }
.start-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); gap: .5rem; }
.start-pic { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--soft); cursor: zoom-in; }
.start-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plan-myself > summary { cursor: pointer; color: var(--accent); margin: 0 0 1rem; }

/* Interview photo questions: tap an existing picture */
.photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .4rem; max-width: 40rem; }
.photo-pick { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 3px solid transparent; cursor: pointer; background: var(--soft); }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pick input { position: absolute; opacity: 0; pointer-events: none; }
.photo-pick:has(input:checked) { border-color: var(--accent); }
.photo-pick:has(input:checked)::after { content: "✓"; position: absolute; top: .2rem; right: .25rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .8rem; display: grid; place-items: center; }
.photo-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
