:root {
  background: #f2f3ed;
  color: #1a2927;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --muted: #51615b;
  --accent: #1b5446;
  --border: #d8e0d8;
  --paper: #fffefa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.shell { width: min(1090px, calc(100% - 64px)); margin-inline: auto; }
.top { background: #162a27; color: #f5f8f0; }
.top-row, .section-heading, .dialog-head, .attachment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-row { min-height: 66px; }
.top a { color: inherit; text-decoration: none; }
.wordmark { font-weight: 780; font-size: 1.02rem; letter-spacing: -.02em; }
.top nav a { border: 1px solid #82918a; border-radius: 9px; padding: .53rem .9rem; }
main { padding-bottom: 3.5rem; }
.hero { display: flex; align-items: flex-start; gap: 26px; margin: 34px 0; padding: clamp(22px, 4vw, 44px); border-radius: 19px; background: #e1ebe1; border: 1px solid #d1dfd1; }
.avatar { width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; background: #225344; color: #fff; border-radius: 20px; font-size: 2rem; font-weight: 800; }
.profile { min-width: 0; flex: 1; }
.label { margin: 0 0 4px; color: #426050; font-size: .89rem; font-weight: 750; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1.16; letter-spacing: -.055em; overflow-wrap: anywhere; }
h2 { font-size: 1.55rem; letter-spacing: -.035em; }
h3 { font-size: 1rem; }
p { line-height: 1.58; }
.tagline { margin-top: 8px; font-weight: 750; }
.blurb { margin-top: 9px; color: #3d544c; white-space: pre-wrap; overflow-wrap: anywhere; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 13px 0 0; }
.tags:empty { display: none; }
.tags li { padding: 4px 9px; border-radius: 20px; border: 1px solid #bbcfbc; color: #2d4b40; font-size: .85rem; }
button, input, textarea, select { font: inherit; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: .52rem .85rem; text-decoration: none; cursor: pointer; font-weight: 740; white-space: nowrap; line-height: 1.28; }
.button:disabled { opacity: .6; cursor: default; }
.button.main { color: white; background: var(--accent); }
.button.main:hover:not(:disabled) { background: #134133; }
.button.outline { color: #234a3d; border-color: #a5b9a9; background: #edf4ea; }
.button.quiet { background: #edf1ea; color: #2a463a; }
.button.danger { color: #823738; }
.muted { color: var(--muted); font-size: .94rem; overflow-wrap: anywhere; }
#work-total { margin-top: 4px; }
.tools { display: flex; gap: 8px; margin: 16px 0; }
input:not([type=file]), textarea, select { display: block; width: 100%; min-width: 0; padding: .68rem .72rem; color: #1a2927; background: white; border: 1px solid #bbc8be; border-radius: 8px; }
.tools select { max-width: 190px; }
textarea { resize: vertical; }
:focus-visible { outline: 3px solid #4f927a; outline-offset: 3px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { min-width: 0; min-height: 177px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: var(--paper); }
.card h3 { font-size: 1.16rem; overflow-wrap: anywhere; letter-spacing: -.02em; }
.card .description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #4c5e56; }
.card .foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: auto; }
.card .button { min-height: 34px; font-size: .86rem; padding: .35rem .6rem; }
.category { color: #33644f; font-size: .85rem; font-weight: 750; }
.empty { padding: 1.8rem 1rem; border-radius: 12px; border: 1px dashed #bcc9bf; color: var(--muted); text-align: center; }
dialog { width: min(650px, calc(100% - 22px)); max-height: 92vh; padding: clamp(16px, 3vw, 25px); border: 1px solid var(--border); border-radius: 17px; background: var(--paper); color: inherit; }
dialog::backdrop { background: #101f1bd0; }
.editor { display: grid; gap: 12px; margin-top: 14px; }
.editor label { display: grid; gap: 6px; font-weight: 680; }
.editor label input, .editor label textarea { font-weight: 400; }
.fields { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 8px; align-items: start; }
.attachment { border-top: 1px solid var(--border); margin-top: 3px; padding-top: 11px; }
.attachment-head { margin-bottom: 5px; }
.attachment h3 { margin-bottom: 4px; }
.attachment .form-line { display: grid; gap: 7px; padding: 9px; margin-top: 8px; background: #f1f4ed; border-radius: 8px; }
.attachment .form-line .button { justify-self: start; }
.file-choose { cursor: pointer; color: #1c5948; }
.file-choose input { max-width: 100%; }
.file-list { display: grid; gap: 4px; margin: 6px 0; padding: 0; list-style: none; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
.form-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.message:not(:empty) { margin-top: 8px; font-size: .91rem; color: #305747; }
.message[data-error="true"] { color: #8d3036; }
pre { overflow: auto; max-height: 285px; padding: 12px; border-radius: 8px; white-space: pre; background: #1e2c2a; color: #eff7f4; }
.detail-section { margin-top: 15px; }
.detail-section p { white-space: pre-wrap; overflow-wrap: anywhere; }
.related { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.related a { color: #1f6050; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 28px); }
  .hero { gap: 12px; margin-block: 22px; flex-wrap: wrap; }
  .hero .outline { margin-left: auto; }
  .avatar { width: 48px; height: 48px; flex-basis: 48px; border-radius: 13px; font-size: 1.3rem; }
  .profile { flex: 1 1 calc(100% - 62px); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tools select { max-width: 112px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .tools input { font-size: .93rem; }
}
