.secret-section[hidden],
.secret-section [hidden],
.secret-badge[hidden],
#pinNoteBtn[hidden] {
    display: none !important;
}

.secret-lock-btn {
    margin-left: 4px;
    padding: 3px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--desc);
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.secret-lock-btn:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.secret-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 34px;
    margin-bottom: 6px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.secret-action-btn:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--accent);
}

.secret-action-icon {
    display: block;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    background-color: currentColor;
    -webkit-mask: url('plus.svg') center / contain no-repeat;
    mask: url('plus.svg') center / contain no-repeat;
}

.secret-card-broken {
    cursor: default;
    opacity: 0.6;
}

.notes-list.select-mode .secret-card .note-card-main {
    margin-left: 0;
}

.secret-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

.secret-badge::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: currentColor;
    -webkit-mask: url('lock.svg') center / contain no-repeat;
    mask: url('lock.svg') center / contain no-repeat;
}

.secret-inline-panel {
    width: 100%;
    margin: 4px 0 10px;
    scroll-margin: 12px;
    animation: secret-panel-in 0.4s var(--ease-out) both;
}

@keyframes secret-panel-in {
    from { opacity: 0; filter: blur(4px); transform: scale(0.97); }
    to   { opacity: 1; filter: none; transform: none; }
}

.secret-inline-panel.closing {
    height: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    opacity: 0;
    filter: blur(4px);
    transform: scale(0.97);
    pointer-events: none;
    animation: none;
    transition:
        opacity 0.2s var(--ease),
        filter 0.2s var(--ease),
        transform 0.25s var(--ease-out),
        height 0.28s var(--ease-out) 0.04s,
        margin 0.28s var(--ease-out) 0.04s;
}

.secret-inline-card {
    position: relative;
    padding: 18px 16px 16px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
}

.secret-inline-card::before {
    content: '';
    display: block;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--accent-subtle);
}

.secret-inline-card::after {
    content: '';
    position: absolute;
    top: 27px;
    left: 25px;
    width: 16px;
    height: 16px;
    background-color: var(--accent);
    -webkit-mask: url('lock.svg') center / contain no-repeat;
    mask: url('lock.svg') center / contain no-repeat;
    pointer-events: none;
}

.secret-inline-card.swap > * {
    animation: secret-swap 0.35s var(--ease-out) both;
}

.secret-inline-card.swap > *:nth-child(2) { animation-delay: 0.03s; }
.secret-inline-card.swap > *:nth-child(3) { animation-delay: 0.06s; }
.secret-inline-card.swap > *:nth-child(n+4) { animation-delay: 0.09s; }

@keyframes secret-swap {
    from { opacity: 0; filter: blur(3px); }
    to   { opacity: 1; filter: none; }
}

.secret-inline-card.shake {
    animation: secret-shake 0.36s var(--ease);
}

@keyframes secret-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.secret-inline-step {
    margin: 0 0 6px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--desc);
}

.secret-inline-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text);
}

.secret-inline-title:focus {
    outline: none;
}

.secret-inline-text {
    margin: 0 0 14px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--desc);
}

.secret-inline-text:empty {
    display: none;
}

.secret-inline-title + .secret-inline-form,
.secret-inline-title + .secret-passkey-btn,
.secret-inline-title + .secret-inline-callout {
    margin-top: 12px;
}

.secret-passkey-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text);
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.secret-passkey-btn::before {
    content: '';
    width: 13px;
    height: 13px;
    background-color: currentColor;
    -webkit-mask: url('lock.svg') center / contain no-repeat;
    mask: url('lock.svg') center / contain no-repeat;
}

.secret-passkey-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--accent);
}

.secret-passkey-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.secret-passkey-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.secret-passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
}

.secret-passkey-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.secret-passkey-info strong {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}

.secret-passkey-info span {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11px;
    color: var(--desc);
}

.secret-passkey-item .secret-link-btn {
    align-self: center;
}

.secret-link-btn.secret-forgot-btn {
    align-self: flex-end;
    margin: -2px 2px 12px 0;
}

.secret-inline-form {
    display: flex;
    flex-direction: column;
}

.secret-inline-input {
    position: relative;
    margin: 0 0 10px;
}

.secret-inline-field {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 42px 0 12px;
    box-sizing: border-box;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 13px;
    color: var(--text);
    transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.secret-inline-field::placeholder {
    color: var(--desc);
    opacity: 0.8;
}

.secret-inline-field:focus {
    border-color: var(--accent);
    background: var(--panel);
}

.secret-inline-field:disabled {
    opacity: 0.6;
}

.secret-inline-field.is-invalid,
.secret-inline-field.is-invalid:focus {
    border-color: #e2504a;
}

.secret-inline-field.is-valid {
    border-color: #55b96b;
}

.secret-field-note {
    margin: -4px 2px 10px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--desc);
}

.secret-field-note:empty {
    display: none;
}

.secret-field-note[data-state="invalid"] {
    color: #e2504a;
}

.secret-field-note:not(:empty) {
    animation: secret-hint-in 0.2s var(--ease) both;
}

.secret-eye-btn.active {
    color: var(--text);
}

.secret-eye-btn {
    position: absolute;
    top: 50%;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: calc(var(--radius-sm) - 2px);
    color: var(--desc);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.secret-eye-btn:hover:not(:disabled) {
    color: var(--text);
    background: var(--accent-subtle);
}

.secret-eye-btn svg {
    display: block;
}

.secret-inline-hint,
.secret-inline-callout {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text);
}

.secret-inline-hint {
    display: flex;
    gap: 8px;
    margin-top: -2px;
    background: rgba(229, 185, 63, 0.14);
}

.secret-inline-hint::before {
    content: '';
    flex: 0 0 6px;
    height: 6px;
    margin-top: 6px;
    border-radius: 50%;
    background: #e5b93f;
}

.secret-inline-hint:empty {
    display: none;
}

.secret-inline-callout {
    margin-bottom: 12px;
    background: rgba(226, 80, 74, 0.08);
    font-weight: 600;
}

.secret-inline-error {
    margin: 0 0 8px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: #e2504a;
    overflow-wrap: anywhere;
}

.secret-inline-error:empty {
    display: none;
}

.secret-inline-hint:not(:empty),
.secret-inline-error:not(:empty) {
    animation: secret-hint-in 0.2s var(--ease) both;
}

@keyframes secret-hint-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

.secret-inline-actions {
    margin-top: 2px;
}

.secret-link-btn {
    align-self: flex-start;
    width: max-content;
    margin: 0;
    padding: 0;
    border-bottom: 1px dotted currentColor;
    border-radius: 0;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--desc);
    cursor: pointer;
    transition: color 0.15s var(--ease);
}

.secret-link-btn:hover:not(:disabled) {
    border-bottom-style: solid;
}

@media (prefers-reduced-motion: reduce) {
    .secret-inline-panel,
    .secret-inline-card.shake,
    .secret-inline-card.swap > *,
    .secret-inline-hint:not(:empty),
    .secret-inline-error:not(:empty) {
        animation: none;
    }
}