:root { --green: #1f6f5c; --bg: #f6f4ef; --line: #ddd8cc; --red: #b3321f; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: #222; font: 16px/1.45 -apple-system, "PingFang SC", sans-serif; padding-bottom: 80px; -webkit-text-size-adjust: 100%; }
.top { position: sticky; top: 0; z-index: 5; background: var(--green); color: #fff; padding: calc(env(safe-area-inset-top) + 8px) 14px 8px; }
.top-main { display: flex; flex-direction: column; }
.top .muted { color: #cfe6df; font-size: 13px; }
.stale { background: #fff3cd; color: #6b4e00; padding: 4px 8px; border-radius: 6px; margin-top: 6px; font-size: 13px; }
main { padding: 10px; max-width: 720px; margin: 0 auto; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
h2 { font-size: 17px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 10px 0 6px; }
.muted { color: #777; } .small { font-size: 12px; }
textarea, input[type=text], input[type=password], input[type=number], input[type=file] { width: 100%; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
button { font-size: 16px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; min-height: 44px; }
button.primary { background: var(--green); color: #fff; border-color: var(--green); }
button.danger, .danger { color: var(--red); }
button.link { border: 0; background: none; min-height: 0; padding: 4px 8px; text-decoration: underline; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; margin-top: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #eee; flex: none; display: flex; align-items: center; justify-content: center; color: #999; font-size: 12px; }
.info { flex: 1; min-width: 0; }
.code { font-weight: 600; font-size: 17px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 10px; background: #eee; margin-left: 4px; }
.tag.warn { background: #fff3cd; color: #6b4e00; } .tag.bad { background: #f8d7da; color: var(--red); }
.fields { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fields label { font-size: 12px; color: #666; flex: 1 1 90px; }
.fields input { padding: 6px 8px; font-size: 16px; }
.summary { background: #f3f8f6; border-radius: 8px; padding: 10px; margin: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.summary div span { display: block; font-size: 12px; color: #666; }
.summary div strong { font-size: 18px; }
.hide-private .private, .hide-private [data-private] { display: none !important; }
.foot { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 4px 10px calc(env(safe-area-inset-bottom) + 4px); display: flex; gap: 6px; align-items: center; font-size: 13px; }
.foot span { flex: 1; }
.msg { min-height: 1.4em; color: var(--red); margin: 8px 0 0; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 8px 14px; border-radius: 20px; font-size: 14px; }
.switch { font-size: 14px; }
.warn-below { color: var(--red); font-weight: 600; background: #f8d7da; border-radius: 6px; padding: 4px 8px; }
output { font-weight: 600; }
