* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Noto Sans KR", sans-serif; background: #f3f6f3; color: #222; padding-bottom: 70px; }
header { background: #2e7d32; color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
header h1 { margin: 0; font-size: 20px; }
#userbox { font-size: 12px; text-align: right; }
main { max-width: 640px; margin: 0 auto; padding: 14px; }
section > * { margin-bottom: 12px; }
.lbl { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
select, input[type=text], textarea { width: 100%; font-size: 16px; padding: 10px; border: 1px solid #bbb; border-radius: 8px; background: #fff; }
button, .btn { font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 0; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
button.primary { background: #2e7d32; color: #fff; width: 100%; font-weight: 600; }
button.primary:disabled { background: #9bbf9d; }
button.secondary, .btn.secondary { background: #e0ece0; color: #1b5e20; }
button.link { background: none; color: #d8f0d8; padding: 0; font-size: 12px; text-decoration: underline; }
main button.link { color: #2e7d32; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
#thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
#thumbs .th { position: relative; width: 84px; height: 84px; }
#thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
#thumbs .x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; padding: 0; border-radius: 12px; background: #c62828; color: #fff; font-size: 14px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.muted { color: #666; font-size: 13px; }
.err { color: #c62828; font-size: 14px; }
article { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
article > * { margin-bottom: 10px; }
.save-row { display: flex; gap: 10px; align-items: center; }
.save-row strong { flex: 1; }
.save-row button { width: auto; flex: 1; }
h2 { margin: 6px 0 0; font-size: 26px; }
h3 { margin: 14px 0 4px; font-size: 15px; color: #2e7d32; }
.sci { font-style: italic; color: #555; }
.badge { display: inline-block; background: #e8f5e9; color: #1b5e20; border-radius: 12px; padding: 3px 10px; font-size: 13px; }
ul { margin: 0; padding-left: 20px; }
#similar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#similar img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #ddd; }
#v-stage { background: #ddd; border-radius: 8px; padding: 6px; }
#v-img { width: 100%; display: block; background: #fff; }
nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid #ccc; padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; background: none; border-radius: 0; padding: 16px; color: #555; }
nav button.on { color: #2e7d32; font-weight: 700; border-top: 3px solid #2e7d32; }

#bar { height: 14px; background: #d6e3d6; border-radius: 7px; overflow: hidden; }
#bar-fill { height: 100%; width: 0; background: #2e7d32; transition: width .8s; }
#bar-text { margin-top: 4px; text-align: center; }

input[type=password] { width: 100%; font-size: 16px; padding: 10px; border: 1px solid #bbb; border-radius: 8px; background: #fff; }
#view-login input { display: block; margin-bottom: 10px; }
.btn.primary { background: #2e7d32; color: #fff; display: block; width: 100%; font-weight: 600; }
button.danger { background: #fdecea; color: #c62828; width: 100%; }
.center { text-align: center; }
#v-select { flex: 3; }
#v-prev, #v-next { flex: 1; }
#v-prev:disabled, #v-next:disabled { opacity: .4; }
