.field { min-width: 0; }
.field label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea { border: 1px solid var(--border); border-radius: var(--radius); min-height: var(--control); padding: 6px var(--space-2); width: 100%; background: var(--surface); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--secondary); }
.field + .field { margin-top: 20px; }
/* 비밀번호 변경 on the settings page: a narrow stack of three fields. */
.password-form { max-width: 360px; }
.password-form .field + .field { margin-top: var(--space-3); }
.password-form .settings-actions { margin-top: var(--space-4); }
.field-hint { color: var(--muted); font-size: var(--text-xs); margin-top: var(--space-1); }
.form-errors { border-left: 3px solid var(--danger); background: var(--selected); color: var(--danger); font-size: var(--text-sm); padding: 12px 16px; margin: 0 0 20px; border-radius: var(--radius-sm); }
.form-errors ul { padding-left: 20px; margin: 8px 0 0; }
.field_with_errors { display: contents; }
.field_with_errors input, .field_with_errors textarea { border-color: var(--danger); }
dialog { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-dialog); background: var(--surface); width: min(var(--modal-width), calc(100vw - 32px)); max-height: calc(100dvh - 48px); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: var(--overlay); }
dialog:not([open]) { display: none; }
dialog:has(.task-create-panel) { margin: min(12vh, 94px) auto auto; }
.modal-heading { padding: 8px 8px 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: var(--text-sm); color: var(--secondary); }
.modal-heading > span { display: flex; align-items: center; gap: 8px; }
.editor-panel { width: 100%; }
main > turbo-frame > .editor-panel { max-width: var(--modal-width); margin: 32px auto; border: 1px solid var(--line); border-radius: var(--radius-dialog); overflow: hidden; }
.standard-form { padding: 24px; }
.auth-page { min-height: 100dvh; background: var(--sidebar); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(400px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 48px; }
.auth-card h1 { font-size: 30px; margin-bottom: 12px; }
.auth-description { color: var(--secondary); margin-bottom: 32px; }
.auth-card form { margin-top: 24px; }
.auth-card form > .button { width: 100%; margin-top: 28px; }
.auth-footnote { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: var(--text-xs); display: flex; gap: 8px; align-items: flex-start; }
.auth-footnote .icon { width: 16px; height: 16px; }
.auth-page + #flash-region .flash { left: 50%; max-width: calc(100vw - 40px); }
.settings-section { display: grid; grid-template-columns: var(--settings-label) minmax(0, 1fr); gap: var(--space-8); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.settings-section h2 { font-size: var(--text-base); }
.settings-content { min-width: 0; }
.settings-section p { color: var(--secondary); font-size: var(--text-sm); margin-bottom: var(--space-3); line-height: 1.8; }
.settings-section p:last-child { margin-bottom: 0; }
.settings-section .button { font-size: var(--text-sm); white-space: normal; text-align: left; }
.settings-section details { margin-top: 20px; }
.settings-section summary { min-height: var(--control); display: flex; align-items: center; gap: var(--space-2); color: var(--secondary); font-size: var(--text-sm); }
.settings-section textarea { font-family: var(--font); }
.settings-section form { margin: 16px 0 0; }
.settings-section .field { max-width: 560px; }
.settings-section .field + .button { margin-top: 12px; }
.inline-status { color: var(--secondary); font-size: var(--text-xs); margin-top: 8px; }
.flash form { display: contents; }
.flash-action { color: var(--surface); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 0; white-space: nowrap; }
.shortcut-dialog { width: min(420px, calc(100vw - 32px)); }
.shortcut-panel { padding: 0 0 var(--space-5); }
.shortcut-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: var(--space-4) var(--space-5) 0; font-size: var(--text-sm); }
.shortcut-list dt { text-align: right; white-space: nowrap; }
.shortcut-list dd { margin: 0; color: var(--secondary); }
kbd { font: inherit; font-size: var(--text-xs); padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: var(--radius-sm); background: var(--subtle); color: var(--ink); }
.shortcut-tip { margin: var(--space-4) var(--space-5) 0; font-size: var(--text-xs); color: var(--muted); }
.theme-options { display: flex; gap: var(--space-2); border: 0; padding: 0; margin: 0; }
.theme-option { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--text-sm); cursor: pointer; }
.theme-option:has(input:checked) { border-color: var(--ink); background: var(--subtle); }
.theme-option input { accent-color: var(--accent); margin: 0; }
.palette-dialog { width: min(640px, calc(100vw - 32px)); margin: min(12vh, 110px) auto auto; padding: 0; }
.palette-panel { display: flex; flex-direction: column; max-height: min(70vh, 560px); }
.palette-search { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.palette-search .icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.palette-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: var(--text-lg); }
.palette-input:focus-visible { outline: none; }
.palette-search kbd { font: inherit; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.palette-list { overflow-y: auto; padding: var(--space-2) 0; }
.palette-group { padding: var(--space-2) var(--space-4) var(--space-1); font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
.palette-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; min-height: 38px; padding: 0 var(--space-4); font-size: var(--text-sm); text-align: left; border-left: 3px solid transparent; }
.palette-item:hover, .palette-item.is-selected { background: var(--subtle); border-left-color: var(--accent); }
.palette-item kbd { font: inherit; font-size: 11px; color: var(--muted); white-space: nowrap; }
.palette-empty { padding: var(--space-4); color: var(--muted); font-size: var(--text-sm); }
.nav-button { width: 100%; text-align: left; }
.nav-kbd { margin-left: auto; font: inherit; font-size: 11px; color: var(--muted); }
.shortcut-sections { display: grid; gap: var(--space-4); }
.shortcut-sections h3 { margin: 0 0 var(--space-1); font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
.preference-form { display: grid; gap: var(--space-1); max-width: 360px; margin-top: var(--space-3); }
.preference-form select { min-height: var(--control); padding: 0 var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); }
.backup-path { font-size: var(--text-xs); word-break: break-all; }
.backup-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; font-size: var(--text-sm); }
.backup-list li { display: flex; align-items: center; gap: var(--space-2); min-height: 28px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.settings-actions form { display: contents; }
