* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    max-width: 860px;
    margin: 0 auto;
    padding: 16px;
    color: #222;
    background: #fafafa;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; margin: 18px 0 10px; }

section { margin-bottom: 28px; }

button {
    padding: 6px 14px;
    border: 1px solid #888;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}
button:hover { background: #eee; }
button.danger { color: #b00; border-color: #b00; }
button.secondary { color: #555; }

textarea, input[type="text"], input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}

.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs a {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}
.tabs a:hover { background: #eee; }
.tabs a.active { color: #222; font-weight: bold; border-color: #888; }

.note-form { display: flex; gap: 8px; align-items: flex-end; }
.note-form textarea { flex: 1; resize: vertical; }

.upload-form { display: flex; gap: 8px; align-items: center; }

.user-form { display: flex; gap: 8px; align-items: center; }
.user-form input { flex: 1; }

.item-list { list-style: none; }
.item-list li {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.note-content {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: inherit;
    max-height: 160px;
    overflow-y: auto;
}

.file-name { flex: 1; word-break: break-all; }

.actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.actions form { display: inline; }
.actions small { color: #888; }

.share-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-form select {
    padding: 6px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.share-link {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}
.share-link input {
    flex: 1;
    padding: 6px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

.item-list li.expired { opacity: 0.5; }
.item-list .share-url {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    color: #555;
}

.empty { color: #999; padding: 8px 0; }
.error { color: #b00; margin: 10px 0; }

.upload-progress { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.upload-progress[hidden] { display: none; }
.upload-progress-track {
    flex: 1;
    height: 10px;
    background: #eee;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0;
    background: #4a90d9;
    transition: width 0.2s;
}
.upload-progress-text { color: #888; white-space: nowrap; }

.login-box {
    max-width: 320px;
    margin: 80px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-box form { display: flex; flex-direction: column; gap: 10px; }
