:root{font-family:Inter,system-ui,sans-serif;color:#182b22;background:#f5f4ee;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,.button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:#234f3b}
.wrap{max-width:720px;margin:auto;padding-inline:18px}.brand{background:#14281f;color:#fff}.brand-line{display:flex;align-items:center;gap:12px;min-height:68px}.mark{display:grid;place-items:center;width:38px;height:38px;background:#d8b76e;color:#16281f;border-radius:10px;font-weight:850}.brand small{display:block;color:#d4dfd8;font-size:12px;margin-top:2px}.install{margin-left:auto;color:#fff;background:transparent;border:1px solid #82988b;padding:8px 12px;border-radius:8px;min-height:42px}
main{padding-top:22px;padding-bottom:48px}h1,h2,h3,p{margin:0}h1{font-size:clamp(25px,6vw,36px);line-height:1.12}h2{font-size:20px}h3{font-size:17px}.muted{color:#51635a}p.muted{margin-top:8px}.card,.room{background:white;border:1px solid #e2e6dd;border-radius:16px;padding:16px;margin-top:14px}.hero{background:#203b2c;color:white;padding:20px;border-radius:17px;margin-top:16px}.hero p{color:#dce7de}.hero strong{font-size:40px;display:block;margin:4px 0}.bar{background:#486353;border-radius:20px;height:9px;overflow:hidden;margin:12px 0}.bar i{background:#e5c57f;display:block;height:100%;border-radius:20px}.row{display:flex;align-items:center;justify-content:space-between;gap:8px}.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.button,button:not(.install){display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #d7e0d6;background:white;color:#203b2c;border-radius:9px;padding:8px 12px;font-weight:650;text-decoration:none}.primary,button.primary{background:#244b36;color:white;border-color:#244b36}.back{display:inline-block;margin-bottom:14px;font-weight:650}.task{padding-top:12px;margin-top:12px;border-top:1px solid #edf0e9}.task p{margin-top:5px;white-space:pre-wrap}.task .actions{margin-top:9px}.task select{flex:1;min-width:120px}.badge{display:inline-block;font-size:13px;background:#eef2e9;border-radius:12px;padding:5px 9px;margin-top:7px}.badge.done{background:#d8eddd;color:#245335}.project-link{display:block;text-decoration:none;color:inherit}.project-link h2{overflow-wrap:anywhere}
form label{display:block;font-weight:650;margin-top:13px}input,textarea,select{width:100%;padding:10px 11px;border:1px solid #cad5ca;border-radius:8px;color:#172c22;background:#fff;min-height:44px}form input,form textarea{margin-top:5px}textarea{resize:vertical;min-height:76px}#notice:empty{display:none}#notice{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);width:min(calc(100% - 30px),480px);background:#14281f;color:white;border-radius:10px;padding:12px;z-index:3}#print{display:none}[hidden]{display:none!important}.room h2,.task strong,h1{overflow-wrap:anywhere}
@page{size:A4;margin:15mm}
@media print{body{background:white;color:black}body>*:not(#print){display:none!important}#print{display:block}.sheet{break-after:page}.sheet:last-child{break-after:auto}.sheet header{padding-bottom:12px;border-bottom:2px solid black;margin-bottom:15px}.sheet h1{font-size:24pt}.sheet h2{font-size:18pt;margin:12px 0}.sheet p{margin:5px 0}.sheet li{border-bottom:1px solid #888;padding:10px 4px;break-inside:avoid;white-space:pre-wrap;overflow-wrap:anywhere}.sheet li span{display:block;font-size:10pt;margin-top:4px}.sheet footer{margin-top:18px;font-size:10pt}}
.work-photo{display:block;width:auto;max-width:100%;max-height:280px;object-fit:contain;margin:12px 0;border-radius:8px}
@media print{.sheet .work-photo{width:auto;max-width:100%;max-height:84mm;border-radius:0}.sheet li{padding-left:2mm}}
.hero .start-date{border-top:1px solid #526b5c;margin-top:14px;padding-top:12px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px}
.phase-list{list-style:none;padding:0;margin:0}
.phase{display:grid;grid-template-columns:34px minmax(0,1fr);gap:11px;padding:13px 0;border-bottom:1px solid #edf0e9}
.phase:last-child{padding-bottom:0;border-bottom:0}
.phase-number{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#edf2e9;color:#244b36;font-weight:750}
.phase .muted{margin-top:4px;font-size:.9rem}.phase select{margin-top:8px;max-width:220px}
.phase{grid-template-columns:minmax(0,1fr) auto;align-items:center}.phase select{max-width:none}form select{margin-top:5px}

@media screen and (max-width: 900px), screen and (pointer: coarse) {
  body { font-size: 19px; line-height: 1.5; }
  .wrap {
    max-width: none;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  main { padding-top: 20px; padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
  .brand-line { min-height: 76px; gap: 10px; }
  .brand-line > div { min-width: 0; overflow-wrap: anywhere; }
  .brand small { font-size: 14px; }
  .mark { flex: 0 0 42px; height: 42px; }
  .install { min-height: 48px; font-size: 16px; flex-shrink: 0; }
  h1 { font-size: clamp(30px, 8vw, 38px); }
  h2 { font-size: 23px; line-height: 1.2; }
  h3 { font-size: 19px; line-height: 1.3; }
  .hero { padding: 18px 16px; }
  .hero strong { font-size: clamp(34px, 10vw, 48px); line-height: 1.15; overflow-wrap: anywhere; }
  .bar { height: 12px; }
  .card, .room { padding: 14px; }
  .row { flex-wrap: wrap; }
  .room .row { align-items: flex-start; }
  .button, button:not(.install), input, select, textarea {
    min-height: 54px;
    font-size: 18px;
    max-width: 100%;
  }
  input, select, textarea { padding: 12px; min-width: 0; }
  textarea { min-height: 112px; }
  input[type="file"] { padding: 10px 8px; }
  form label { margin-top: 16px; }
  form .actions button[type="submit"] { width: 100%; }
  a.back { display: inline-flex; align-items: center; min-height: 48px; }
  .project-actions, .task-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr));
    gap: 10px;
  }
  .project-actions .primary, .task-actions select { grid-column: 1 / -1; }
  .badge, .phase .muted { font-size: 16px; }
  .work-photo { max-height: 360px; }
  #notice { bottom: calc(12px + env(safe-area-inset-bottom)); }
}

.progress-red { --progress-ink: #a12232; --progress-bright: #ff9ba3; }
.progress-yellow { --progress-ink: #805600; --progress-bright: #ffdb72; }
.progress-green { --progress-ink: #176141; --progress-bright: #8ee5ac; }
.progress-value { color: var(--progress-ink); }
.hero .progress-value, .hero .bar i { color: var(--progress-bright); }
.hero .bar i { background: currentColor; }

@media screen {
  :root { background: #f4f1e8; color: #29332c; }
  .brand { background: linear-gradient(105deg, #344b40, #40594d); }
  .brand small { color: #e2e9e1; }
  .mark { background: #e3d7b5; color: #35453a; }
  .install { border-color: #afc0b4; }
  a { color: #355746; }
  .muted { color: #545e55; }
  .card, .room { border-color: #dedfd4; box-shadow: 0 3px 12px #344b400e; }
  .card > h2 { color: #344b40; }
  .room { border-left: 4px solid #a2b39b; }
  .room h2 { color: #344b40; }
  .hero { background: linear-gradient(125deg, #344b40, #41594a); }
  .hero p { color: #edf1e8; }
  .hero .start-date { border-color: #ffffff55; }
  .hero .bar { background: #ffffff40; }
  .progress-red { --progress-bright: #ffc0bd; }
  .progress-yellow { --progress-bright: #f3dca0; }
  .progress-green { --progress-bright: #bce6c5; }
  .badge { background: #e9ede4; }
  .button, button:not(.install) { background: #edf0e7; border-color: #c9d2c4; color: #354c40; }
  .primary, button.primary { background: #42634f; border-color: #42634f; color: #fff; }
  :focus-visible { outline: 3px solid #785b2d; outline-offset: 2px; }
}

@media screen and (max-width: 900px), screen and (pointer: coarse) {
  .renovation-phases > h2 {
    font-size: 33px;
    font-weight: 650;
  }

  .renovation-phases .phase h3,
  .renovation-phases .phase .muted,
  .renovation-phases .phase .progress-value,
  .daily-progress,
  .daily-progress > h2,
  .daily-progress .badge,
  .daily-progress .button {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .daily-progress .task > strong { font-weight: 650; }
}

.project-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.expense-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.expense-heading > strong { flex: 1 1 180px; }
.expense-amount {
  color: #294c38;
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
button.expense-delete { color: #942331; border-color: #e6bec2; background: #fff2f2; }

.client-access [role="status"] { margin-top: 8px; color: #51635a; line-height: 1.55; }
.client-access [role="status"] strong { color: #234f3b; }

.progress-video { margin-top: 8px; }
.progress-video summary { cursor: pointer; color: #234f3b; padding: 8px 0; }
.progress-video video { display: block; width: 100%; max-width: 560px; max-height: 360px; background: #203b2c; border-radius: 9px; margin-bottom: 6px; }
input[name="progressVideo"]::file-selector-button { font: inherit; cursor: pointer; padding: 6px 10px; margin-right: 8px; border: 1px solid #c9d2c4; border-radius: 6px; background: #edf0e7; color: #203b2c; }
