:root {
    --color-bg: #f7f7f8;
    --color-surface: #ffffff;
    --color-text: #1b1d21;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-danger: #dc2626;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    text-decoration: none;
}

nav a, .link-button {
    color: var(--color-muted);
    text-decoration: none;
    margin-left: 16px;
    font-size: 0.95rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

nav a:hover, .link-button:hover {
    color: var(--color-primary);
}

.inline-form {
    display: inline;
}

main.container {
    padding-top: 32px;
    padding-bottom: 48px;
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

input[type="text"], input[type="email"], input[type="password"], input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: var(--color-primary-dark); }

.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #b91c1c; }

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.error {
    color: var(--color-danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.info {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.rename-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}

.rename-form input[type="text"] {
    width: auto;
    flex: 1;
    min-width: 0;
}

.doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.doc-meta { flex: 1; min-width: 0; }

.doc-title {
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text);
    word-break: break-word;
}

.doc-site {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.progress-bar {
    background: var(--color-border);
    border-radius: 999px;
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--color-primary);
    height: 100%;
}

.doc-actions { flex-shrink: 0; }

.muted { color: var(--color-muted); font-size: 0.85rem; }

.site-footer {
    padding: 24px 0;
    text-align: center;
}

.site-footer a {
    color: var(--color-muted);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 8px 0; }
    nav a, .link-button { margin-left: 0; margin-right: 14px; }
    .doc-item { flex-direction: column; align-items: flex-start; }
    .doc-actions { align-self: flex-end; }
}
